In cases of divorce, be it raj`i (revocable) or ba’in (irrevocable), the wife must spend a period called `iddah during which she must stay in the marital home. She must never desert that house nor does her husband has a right to drive her out of it. This is based on Allah’s saying: “O Prophet! When ye (men) put away women, put them away for their (legal) period and reckon the period, and keep your duty to Allah, your Lord. Expel them not from their houses nor let them go forth unless they commit open immorality. Such are the limits (imposed by) Allah; and whosoever transgresseth Allah’s limits, he verily wrongeth his soul. Thou knowest not: it may be that Allah will afterward bring some new thing to pass.” (At-Talaq: 1)
Thus, during that period (which implies the continuation of marriage), the wife must stay in the marital home. The wisdom behind that is to provide an opportunity for the spouses to re-tie the knot legally. However, if that period elapses, the wife must leave the house. The wife gains the right of child custody until she gets married, then that right is passed on to her mother then to her mother in-law then to the husband.

Shedding more light on this issue, we’d cite the following Fatwa issued by Sheikh M. S. Al-Munajjid, a prominent Saudi Islamic lecturer and author:

“The best way for a child to be brought up is with both of his parents, because if he is cared for by both this will strengthen him physically, enhance his intellectual development, keep his soul pure and prepare him for life.

If it so happens that the parents separate, then the mother has a greater right to custody than the father, unless there is reason not to give priority to the mother or there is a reason to give the child the choice in the matter.

The reason why the mother is given priority is that she is the primary caregiver and is the one who breastfeeds the child; she is also better able to care for the child and take care of him. She has more patience than a man in this regard, and has more time than he does, so the mother is given priority in the best interests of the child.

It was reported from `Abdullah ibn ‘Umar that a woman said, “O Messenger of Allah, my womb was a container for this son of mine and my lap was a haven for him, and he drank from my breast, but his father is claiming that he should take him from me.” The Prophet (peace and blessings of Allah be upon him) said: “You have more right to him (to custody of him) so long as you do not remarry.” (Narrated by Ahmad)

Yahyaa ibn Sa’eed said: “I heard al-Qaasim ibn Muhammad said: ‘ ‘Umar ibn al-Khattaab had a wife from among the Ansaar who bore him ‘Aasim ibn ‘Umar, then ‘Umar divorced her. ‘Umar came to Quba’ and found his son ‘Aasim playing in the courtyard of the mosque. He took him by the arm and seated him in front of him on his riding-animal, but the child’s grandmother caught up with him and fought with him over the child until they went to Abu Bakr al-Siddeeq. ‘Umar said, ‘(He is) my son!’ and the woman said, ‘(He is) my son!’ Abu Bakr said: ‘Leave them alone,’ and ‘Umar did not answer back.” (Narrated by Maalik in al-Muwatta’, 2/767; al-Bayhaqi, 8/5). Ibn ‘Abd al-Barr said: this hadeeth is well known with a variety of isnaads, complete and incomplete, and is accepted by the scholars.

According to some reports, [Abu Bakr] said: the mother is more compassionate, more kind, more merciful, more loving and more generous, and she has more right to her child unless she remarries.

Abu Bakr’s description of the mother as being more compassionate and more kind is the reason why the mother has more right to the custody of her young child. (See Fiqh al-Sunnah, 2/289-290)”

“Women have more right to custody of children than men; in principle custody belongs to them, because they are more compassionate and more kind, and they know better how to raise small children, and they are more patient in dealing with the difficulties involved. The mother has more right to custody of her child, whether it is a boy or a girl, so long as she does not re-marry and so long as she meets the conditions of custody. This is according to scholarly consensus.

The conditions of custody are: being accountable (i.e., an adult of sound mind etc.), being of good character, being a Muslim if the child concerned is a Muslim, and being able to fulfill all obligations towards the child. The mother should not be married to a person who is a stranger (i.e., not related) to the child. If one of these conditions is not fulfilled and there is an impediment such as insanity or having remarried, etc., the woman forfeits the right to custody, but if that impediment is removed, then the right to custody is restored. But it is best to pay attention to the interests of the child, because his rights come first.

The period of custody lasts until the age of discretion and independence, i.e., until the child is able to discern what is what and is independent in the sense that he can eat by himself, drink by himself, and clean himself after using the toilet, etc.

When the child reaches this age, the period of custody ends, whether the child is a boy or a girl. That is usually at the age of seven or eight.

When the child reaches the age of independence, the period of custody comes to an end, and the period of kafaalah or sponsorship of the young begins, which lasts until the child reaches adolescence or in the case of a girls, starts her periods. Then the period of sponsorship ends and the child is free to make his own choices.

Women’s rights to sponsor children. It appears from the comments of the fuqaha’ that women have the right to sponsor children in general, and that mothers and grandmothers in particular have this right. But the scholars differed as to who has more right to sponsorship if the parents are in dispute and are both qualified to sponsor the child. The Maalikis and Zaahiris think that the mother has more right to sponsorship of the child, whether it is a boy or a girl. The Hanbalis think that boys should be given a choice, but the father has more right in the case of a girl. The Hanafis think that the father has more right in the case of a boy and the mother has more right in the case of a girl. Perhaps the correct view is that the child should be given a choice if the parents are disputing and they both fulfill the conditions for sponsorship.