A Muslim woman is asking who has more right to custody of the child, herself or her ex-husband?

Question

Women have more right to custody of children than men. In principle custody belongs to them, because they bear 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 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 period of custody lasts until the age of discretion and independence, i.e., until the child is able to discern what is what. That is usually at the age of seven for boys or nine for girls.