Custody (Hadhanah) holds great importance, as it is a process that shapes a child's character throughout life. The establishment of the age of discernment (mumayyiz) in Indonesia is stipulated in the Compilation of Islamic Law, while in the state of Selangor, it is defined in the Selangor Islamic Family Law Enactment 2003. One implication of setting the mumayyiz age is that it allows a child to choose to live with one of the parents in the event of a divorce. This study is a type of normative legal research employing a comparative law approach. The legal materials used include primary, secondary, and tertiary sources. Data collection techniques are conducted through a literature review of both print and digital sources, using descriptive analysis and inductive reasoning. The results of this study indicate that the age of discernment, according to the Compilation of Islamic Law, is 12 years, while the Selangor Islamic Family Law Enactment 2003 sets it at 7 years for boys and 9 years for girls. The similarities between these two regulations lie in the division of custody (hadhanah) rights, maintenance obligations, post-maternal care, a child's right to choose, and social conditions. The differences, however, involve the strength of legal basis, the determination of the age of discernment, requirements for the caregiver, safeguarding of a child's assets, and the transfer of custody (hadhanah) rights. Developmental psychology suggests that the ideal age for children to make such a choice, within the range of 7 to 12 years, begins at 12 years, as their cognitive and social development at this age is considered sufficient to make a sound decision.