Allah, the Mighty and Majestic, says: "And it is not lawful for you to take back anything of what you have given them, unless both fear that they will not be able to keep within the limits of Allah. But if you fear that they will not keep within the limits of Allah, then there is no sin on either of them concerning that (wealth) with which the woman ransoms herself (to free herself)." [Surah al-Baqarah: 229]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب القسم والنشوز / Q14836