If and when a marriage unfortunately comes to an end, the problems of the parties involved should not in any way affect the children. Children are a trust (amanah) from Allah Most High and they should be treated and looked after in a proper manner. They have many rights, of which two are of utmost importance: to receive proper care and love, and the other proper upbringing (tarbiyah). These rights of a child can not be fulfilled except with the joint endeavour of the parents. The love, care and attention of the mother is just as important as the upbringing and training of the father. In light of the above, divorce should definitely be avoided as much as possible, especially in the case where there are children involved. The Messenger of Allah (Allah bless him & give him peace) said: “Divorce is the most hated of all lawful (halal) things in the sight of Allah.” (Sunan Abu Dawud, no. 2178) However, if divorce did take place, and both parties demand their rights, then the right of custody will be in the following way. In should be remembered here that there is nothing wrong in making a mutual arrangement, as long as there is no objection from those who have a right to custody: The mother has a right of custody for a male child until the child is capable of taking care of his own basic bodily functions and needs, such as eating, dressing and cleaning himself. This has been recognized at seven years of age. Imam al-Haskafi (Allah have mercy on him) states: “The custody of a male child is the right of the mother until the child is capable of taking care of his own self. This has been approximated at seven years of age, and the Fatwa (legal verdict) has been issued on this age, as normally children are able to take care of themselves at this age.” (See: Radd al-Muhtar, 3/566) In the case of a female, the mother has this right of custody until she reaches puberty. This has been declared at nine years of age. (al-Mawsili, al-Ikhtiyar li ta’lil al-mukhtar, 3/237) The right of custody will be taken away from the mother if she: 1) Leaves Islam, 2) Openly indulges in sins such as adultery and there is a fear of the child being affected, 3) She does not attend to the child due to her leaving the house very often, 4) She marries a non-relative (stranger) to the child by which the child may be affected, 5) She demands payment for the upbringing of the child if there is another woman to raise the child without remuneration. In the above cases (when the mother no longer has the right to custody), this right then transfers to the following, in order: a) Maternal grandmother, and on up; b) Paternal grandmother, and on up; c) Full sisters, d) Maternal half sisters, e) Paternal half sisters, f) Maternal aunts, g) Paternal aunts, After all the avenues of the female have been exhausted as explained by the Jurists, the males have the right of custody in the following sequence: a) Father, b) Paternal grandfather, c) Real brother, d) Paternal brother, e) Maternal brother, The reason for this is that, in the early years, the mother and the other female relatives are more suitable for raising the young child (regardless of sex) with love, mercy, attention, and motherly care. The male child after reaching the age of understanding (7) is in need of education and acquiring masculine traits, which is why he is then transferred to the father. The female child, after reaching the age of understanding is in need of being inculcated with female traits, which she receives by living with her mother. After reaching puberty, she is in need of protection which the father offers. In a Hadith recorded by Imam Abu Dawud in his Sunan, the Messenger of Allah (Allah bless him & give him peace) said to a woman who complained that her husband was intending to take her child away from her: “You are more rightful of the child as long as you don’t marry.” (Sunan Abu Dawud, no. 2276 & Mustadrak al-Hakim, 2/207) It should also be remembered that after the transferral of custody from the mother to the father, the boy remains in the custody of the father until puberty, at which point, if he is mature and wise, he is free to choose with whom to live, or to live on his own. As for the girl, custody remains with the father until she marries. (See: Qadri pasha, Hanafi articles, 498 & 499) Irrespective of who (mother/father) has the right of custody, the other party has visitation rights according to mutual understanding and consent. Generally, the party having the rights of custody use the child as a weapon to punish the other party by depriving them of visitation rights. This is totally against the concept of Islam and a severe, brutal and grave sin indeed, and also very harmful to the child. Unfortunately, many so called “religious” people are also involved in this heinous act. At all times, the father of the child is responsible for maintaining the child; in the case of a female, until she marries; while in the case of a healthy male, until he reaches maturity. In the case of a disabled child (male or female) the father is permanently responsible. When the mother has the rights of custody but does not have a shelter to stay in with the child, the father must provide shelter for both. (See: Radd al-Muhtar of Ibn Abidin). With the above, I hope all your questions have been answered.