In the time of the rule of Umar a woman came to him and confessed of adultery. She also said, “Please impose the penalty of fornication upon me.”
When Umar heard this, he ordered that the penalty of fornication be executed upon this woman. ‘Ali (a.s.) happened to be there and was surprised at this. He said, “Umar, inquire from this woman the conditions when she had committed fornication.”
The woman explained, “I was extremely thirsty in the desert. When I went far in search of water, I sighted a black tent which belonged to an Arab. I approached him and asked for water. But he refused to give me any water without my having adultery with him. I did not agree to his devilish desires and ran away into the desert. My eyes became sunken and I felt as if each of my bones were breaking. I returned to this man and in exchange of a drink of water I gave my body to him.”
‘Ali (a.s.) said,
“It is this compulsion which is mentioned in the ayat,
‘…But whoever is compelled by hunger, in inclining willfully to sin, then surely Allah is Forgiving Merciful,’ (Surah al-Mā’ida 5:3).
This woman is not at all guilty of the crime.”
Then Imam (a.s.) ordered for her release and she was released.( Burhan al-Qur’an )