Madonna and her ex-husband Guy Ritchie have officially settled their custody dispute over teenage son Rocco.

The exes have been involved in a transatlantic legal battle since December (15), when Rocco refused to return to his mother's home in New York after visiting his London-based dad for the Christmas holidays.

Madonna launched legal action seeking to have their boy sent back to the Big Apple, but the Manhattan judge overseeing the case urged the warring parents to work together to resolve their differences for the sake of the 16-year-old.

The pop superstar and the British filmmaker appeared to heed the advice, and Madonna was reunited with Rocco in April (16), when she visited him in the U.K.

The teen has since been spotted splitting his time between his parents' home cities, while he even joined the Vogue hitmaker for a family vacation in Cuba last month (Aug16).

By June (16), the former couple was said to be nearing an agreement, and on Wednesday (07Sep16), lawyers for the stars filed papers notifying officials the case had been settled privately, according to

The news emerged hours before they were due in court for a progress hearing, which had previously been postponed from 14 June (16) to allow the two parties to continue negotiations.

The terms of the settlement are confidential, but Rocco is expected to be allowed to live with his father in London, where he will study, and make frequent visits to New York to spend time with his mother and siblings.

Madonna is also mum to 19-year-old Lourdes Leon, and adopted children David and Mercy, both 10, while Ritchie and his second wife Jacqui have three young kids - five-year-old Rafael, two-year-old son Levi, and daughter Rivka, three.