"Their custody case is resolved," Lucian Chalfen, spokesman for the New York court where the divorced couple had fought for custody of their son Rocco, told AFP on Thursday.
The custody agreement reached Wednesday stipulates that the 16-year-old is to remain with his British father, according to US media reports citing Ritchie's lawyer, Peter Bronstein.
Bronstein was not immediately available to comment.
Madonna, who wanted her son to live with her in the United States, reacted enigmatically on social media. The pop star posted a photo of herself on Instagram wearing a black hoodie with the word "bitch" scrawled across it in red.
More From This Section
Judges heard that Rocco remained in London with his father after a visit in December last year. Madonna wanted the teen to return to live with her in the State of New York.
The celebrity couple divorced in 2008 after eight years of marriage. Madonna aired her feelings about the painful end to their relation in her album "MDNA", released in March 2012.
The two also have a 10-year-old adopted son, David Banda.