Hadith.4504 - Abdullah ibn Jafar al-Himyari narrated from Ayyub ibn Nuh, who said
One of his (as) companions wrote to him, saying: "I had a wife, and I have a child from her, but I divorced her."
Imam (as) wrote in reply: "The mother has more right to the child until the child reaches seven years of age, unless the mother chooses otherwise."