There is no sin in divorcing your wives before the consummation of marriage or settling the dowry; but then provide adequately for them, the affluent according to their means, the poor in accordance with theirs as is befitting. This is surely the duty of those who do good. 236 And if you divorce them before you have touched them and you have appointed for them a portion, then (pay to them) half of what you have appointed, unless they relinquish or he should relinquish in whose hand is the marriage tie; and it is nearer to righteousness that you should relinquish; and do not neglect the giving of free gifts between you; surely Allah sees what you do. 237 Attend constantly to prayers and to the middle prayer and stand up truly obedient to Allah. 238 But if you are in danger, then (say your prayers) on foot or on horseback; and when you are secure, then remember Allah, as He has taught you what you did not know. 239 And those of you who die, leaving wives, let them make testament for their wives, provision for a year without expulsion; but if they go forth, there is no fault in you what they may do with themselves honourably; God is All-mighty, All-wise. 240 And the divorced women, too, shall have [a right to] maintenance in a goodly manner: this is a duty for all who are conscious of God. 241 Thus does God explain His revelations to you so that perhaps you will have understanding. 242