Madonna and Guy Ritchie

Madonna and Guy Ritchie at the Palais des Festivals during the 61st International Cannes Film Festival on May 21, 2008 in Cannes, France. 

Gareth Cattermole/Getty Images

Madonna and Guy Ritchie should think of their 15-year-old son's best interests and quickly resolve a months-long dispute over with whom the boy will live, a state judge said in a proceeding Wednesday in Manhattan.

State Supreme Court Justice Deborah Kaplan implored the divorced singer and film director to settle the matter a day after their lawyers said a deal reached late Tuesday had fallen apart.

"No one is disrupting his household other than the inability of the parents to reach a resolution," Kaplan said. "If they cannot resolve this matter then eventually the court will."

Madonna Declaration Doesn't Save Sean Penn Lawsuit, Lee Daniels Says

Ellen Sigal, a court-appointed attorney for Rocco Ritchie, said her client has been stressed about his future since leaving his mother's worldwide tour last year to stay with Ritchie in London, where he now attends school.

"It's been a very difficult time for him," she said in court. "We hope to put an end to this as soon as possible without exposing him to more litigation, press innuendo, any of that kind of thing."

In December, Kaplan ruled that Rocco should return to his mother's custody. Records show Madonna, whose legal name is Madonna Louise Ciccone, moved for the judge to enforce that order.

On Wednesday, Kaplan said she wasn't going to remove the order but also said she wasn't planning on issuing a warrant to compel Ritchie to appear in New York.

Madonna Makes Surprise Visits to Manila Children's Shelters

Ritchie, who directed the 1998 thriller Lock, Stock and Two Smoking Barrels, and Madonna divorced in New York in 2008.

Neither parent appeared in court, instead calling in from abroad. She performed Sunday in Singapore and is scheduled to perform Saturday in Auckland, New Zealand. Ritchie called in from London.