In order to avoid despair in these circumstances we need to reflect on  the incident of Prophet Yusuf (peace be upon him) when he was invited to  a vice by the wife of the ruler. He was aware that all the doors were  locked, however, he decided to do whatever was within his means. That  was, to run towards the door to escape. He did that. And Allah helped  him by unlocking the doors miraculously. (Mufti Muhammed Taqi Usmani Sahab (DB))
Courtesy : Ashrafia
