The former couple have been fighting over the 16-year-old since December, after reports claimed Rocco declared he wanted to live with his father in London, rather than staying in New York with his mother.
According to TMZ, both parents were set to attend court on Wednesday (7 September) but ultimately settled the matter privately, informing the judge hours before the scheduled hearing.
The details of the settlement are said to be confidential, though the site has suggested that Rocco will remain in London with his film director father, while still “frequently” seeing his mother.
Reports of the custody battle first emerged shortly after Christmas, after Rocco chose to spend the holiday with his father, step-mother and half-siblings, rather than with his mother.
Things took an unamicable turn in the weeks and months that followed, with Rocco even calling out his mother on social media. Madonna also addressed the matter during an intimate live show in Australia, where she dedicated a performance of deep cut ‘Intervention’ to her son.
Since then, the two are said to have patched things up, with Madonna sharing several snaps of Rocco on her Instagram page over the summer, including one of a family holiday to Cuba.
Madonna and Guy also share custody of a 10-year-old son, David, while the pop singer also has two daughters.
Guy has since had three children with new wife Jacqui Ainsley, the youngest of whom was born in 2014.
Tap the image below to launch the slideshow...