Allah the Almighty commands:
“If you worry that they will not be able to keep within the limits of Allah, there is no blame upon them if she sets herself free by giving back (what she received). These are the limits of Allah, so do not transgress them. The ones that transgress the limits of Allah are the real wrongdoers.” (Al-Baqara/The Cow 2:229)
If a woman decides to divorce her husband, she applies to the authorities with her request. The authority decides on whether the husband has committed an injustice to his wife or not. If the husband has no blame, she gives back what she received from him as Mahr. The expression in the verse “by giving back (what she received)” might be understood as both the entire amount of the Mahr or as some part of it. The amount to be paid back is decided by the authorities by determining whether the husband has a guilt or not.
The authority mentioned above should be the law court or a local judge. In the two examples given below, the women have taken their cases to the Prophet and Umar.
Habiba bint Sahl al-Ansari was married to Thabit ibn Qays. One day while the Prophet was going for the morning prayer, he noticed Habiba in front of his door.
– “Who are you?” he asked.
– “Habiba, the daughter of Sahl” she answered.
– “What happened?”
– “I don’t want to continue to live with Thabit.”
When Thabit came, the Prophet said to him: “Habiba explained me everything.”
Habiba said: “Messenger of Allah, I have everything he gave me.”
The Messenger of Allah told Thabit: “Take that property from her.”
He took it back and Habiba went to live with her family.
Once, a woman came to Umar ibn Al-Khattāb and complained about her husband. The woman was asked to stay one night in a hut of straw. Umar came in the morning and asked the woman about her night. She replied that she never had had that a brilliant night. Then Umar asked the woman about her husband. She praised him and later added “He is what he is, but I can’t help it.” After then, Umar accepted her request to divorce her husband.
Umar’s purpose was to understand the seriousness of the woman’s request. Neither the Prophet, nor Umar asked the women their reason for divorce.
The verse below shows us an example of divorcing women. Allah the Almighty commands:
“Believers! When believing women come to you as emigrants, test them. Allah knows their true faith. If you think them to be believing women, do not send them back to those concealers. Those women are no longer lawful to them, nor are they lawful to those women. Send them (their ex-husbands) what they gave (as mahr). There is no blame upon you to marry those women when you give them their mahr. Do not hold on to your marriages with concealer women. Request what you gave (to them as mahr) and let them (divorced men like you) request what they spent (to their ex-wives as mahr). Such is Allah’s command. He judges between you. Allah knows and judges rightly.” (Al-Mumtahana/ The Examined One 60:10)
The phrase “those women are no longer lawful to them, nor are they lawful to those women” shows that emigrant women were divorced from their husbands.
 Bukhari, Talaq, 13