Assalamualaikum ustaz. Who is more rightful to get custody of children after a divorce?
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
Child custody or according to syarak it is called hadhanah means:
- According to Syeikh Ali al-Jurjani, “hadhanah” is “تربية الولد” (caring and educating of the child). 
- According to al-Mu`jam al-Wasit, the word “hadhanah” means: “State of authority on a child to educate and manage his affairs.” 
- Ibn Manzur in Lisan al-Arab stated: “Al-Hidhnu is a part of the body under the armpits until the ribs. It is said; it is the chest and both arms and the area between them. Its plural is ahdhan. It is also stated as ihtidhan, which means “you who is bearing something and making it under your authority,” just like a woman who carries her child on one side of her body.” 
- Imam al-Nawawi said: “al-Hadhanah with a fathah (diacritic symbol) on the letter ha’ is caring of a child,” it is taken from (the word) al-hidn with a kasrah (diacritic symbol) ha’ and (the word) in the plural is ahdhan means “side”, for the caring gathers her (the guardian) together with the individual she is taking care of. Thus, ahdhantu al-syai’ means “I make it under my care” and hadhantu al-sobiyy means I’m taking care of a baby.” 
- According to the book al-Fiqh al-Manhaji: “The word hadhanah means child custody. Lexically, hadhanah means side or flank. The reason is the guardian of the child takes care of the child by her side.” 
Whereas the syarak definition of it isn’t much different from its lexical definition:
- In Raudhah al-Talibin by Imam al-Nawawi, “hadhanah” means: “Upholding (the rights) by taking care of a person who has yet to reach mumayyiz and isn’t independent to take care of himself and caring for him with what he deserves and protecting from harms.” 
- Imam al-Nawawi said in Minhaj al-Tolibin: “Taking care of an individual who couldn’t take care of himself, educating and nurturing him.” 
- Imam al-Khatib al-Syarbini explained the above definition by saying: “(The meaning of “hadhanah”) from Syarak is [taking care of an individual who can’t take care of himself] from taking care of himself, (and) protecting him from any harm due to his incapability for tamyiz (differentiating good and bad), such as young children and insane adult; [taking care or educating] means taking care of the child with anything that is appropriate and reasonable in the implementation by providing food and drink and others… and expenses of the child comes from the child’s under the custody, if there is none, it is the responsibility of the individual who is responsible for the child’s sustenance. The reason is taking care of the child is one of the kifayah reasons such as sustenance; and thus, the chapter of custody is explained after the chapter of sustenance.” 
- According to al-Fiqh al-Manhaji: “According to Syara’, it means taking care of a person who isn’t able to take care of himself and nurture him in various ways appropriate with his developmental stage. For a young child, hadhanah ends until the age of mumayyiz.”
Child custody after the age of mumayyiz until he reaches puberty is named kafalah, which means to protect.
From Abdullah bin ‘Amr R.Anhuma, Rasullullah PBUH said:
يَا رَسُولَ اللَّهِ إِنَّ ابْنِي هَذَا كَانَ بَطْنِي لَهُ وِعَاءً وَثَدْيِي لَهُ سِقَاءً وَحِجْرِي لَهُ حِوَاءً وَإِنَّ أَبَاهُ طَلَّقَنِي وَأَرَادَ أَنْ يَنْتَزِعَهُ مِنِّي فَقَالَ لَهَا رَسُولُ اللَّهِ صلى الله عليه وسلم: أَنْتِ أَحَقُّ بِهِ مَا لَمْ تَنْكِحِي
“O Allah’s Messenger, this son of mine: my womb was a receptacle for him, my breasts were a source of suckling for him, and my lap was a place for him to curl up in, yet his father has divorced me and wants to take him away from me.” Allah’s Messenger (ﷺ) replied to her, “You have more right to him as long as you do not remarry.” 
According to the above evidences as well as other evidences, all Muslims have agreed on the sanctioning of hadhanah is to protect the welfare of the young child after the divorce of a husband and wife.
Who is More Rightful of the Custody of the Child?
Islam has set who is the most rightful for the custody of the child after the break of a marriage is the mother’s for as long as she doesn’t remarry. The Prophet PBUH said: أَنْتِ أَحَقُّ بِهِ مَا لَمْ تَنْكِحِي shows that the mother is the most rightful to gain custody of the young child. The decision for hadhanah is decided by the Shariah Court and if the mother is found unfit by the court to take care of the child, then the right changes to one of the following:
- Maternal grandmother and the ancestors;
- Paternal grandmother and the ancestors;
- Maternal half-sister;
- Paternal half-sister;
- Sister’s daughter;
- Maternal half-sister’s daughter;
- Paternal half-sister’s daughter;
- Maternal aunt
- Paternal aunt
- A male heir who can be his heir as ‘asabah or residuary:
On the condition that the said person wouldn’t affect the welfare of the child.
Eligibility Conditions for Custody
A person who has child custody reserves the right to fulfil the right of hadhanah if:
- A Muslim;
- Perfect or complete rational;
- He is of the age that makes him eligible to provide the child with the care and love that the child may need;
- He has good Muslim character and conduct; and
- He lives in a place where the child is safe from any harm may it be his physical or spiritual welfare.
Matters that will make a person loses the custody
As stated previously, child custody after a divorce is given to the mother, however, in certain situations, she may lose custody, among them are:
- If the woman marries a person who doesn’t have any relation with the child and the person is prohibited from marrying the child, if the child’s custody will affect the welfare of the child, however, the custody will return to her if the marriage is dissolved.
- If the woman is openly acting with excessively bad character;
- If the woman changes her place of residence with the purpose of preventing the father of the child from checking up on the child, except if she takes the child back to her birthplace;
- If the woman denounces Islam;
- If the woman neglects or oppresses the child.
The custody continues from the birth of the child until mumayyiz¸ which means that when the child is able to manage specific affairs of his matters without any help from others such as being able to eat and drink by himself, can manage to go to the bathroom himself, cleaning himself from filth and is able to perform taharah (purify) such as taking ablution and others.
It is set that the age of mumayyiz is seven years old, for this is the common age a child is considered mumayyiz. It can also be possible that it is until the child reaches 8 years old, it depends on the specific child and mumayyiz isn’t determined based on the age. 
Hopefully, this explanation will provide some information for those out there in understanding the issue of child custody for a young child after divorce. Hadhanah is none other than the responsibility related to the welfare of the young child so that the child isn’t oppressed nor neglected.
 See al-Ta`rifat, pg. 88
 See al-Mu`jam al-Wasit, 1/182
 See Lisan al-Arab, 13/122
 See Tahrir Alfadz al-Tanbih, pg.30
 See al-Fiqh al-Manhaji, 2/181
 See Raudhah al-Talibin, 9/98
 See Minhaj al-Tolibin, pg. 266
 See Mughni al-Muhtaj, 5/191
 Narrated by Abu Dawud (2276). Syeikh Syuaib al-Arnout in Takhrij Syarh al-Sunnah, (9/332-333) stated the sanad is hasan.
 See al-Mu’tamad fi al-Fiqh al-Syafi’e, 4/306-307