Usher and his ex wife Tameka Raymond have been battling each other over a custody agreement for their kids for years, but now a judge has given the divorced couple an ultimatum to work something out … “or else.”

Usher and Tameka attended a court hearing in Atlanta Tuesday (May 1), and the judge ordered that the two of them sit down privately and work out a temporary custody agreement.

If they can’t work something out amongst themselves, the Fulton County Court judge says he will impose a temporary order.

Usher — who filed for divorce from Tameka in June 2009 after almost two years of marriage — also addressed child support payments during the hearing.

Tameka previously accused Usher of being behind on at least $34,000 worth of child support payments, and according to court documents, she is also requesting more child support on account of a “substantial change” in Usher’s income since they divorced.

Tameka filed court documents in Georgia last year asking the singer to be completely stripped of joint physical custody of their two sons, 4-year-old Usher V (aka “Cinco”) and 3-year-old Naviyd.

Tameka also suggested that Usher was an unfit father, and even went as far as to go to the judge and demand the singer be drug tested because she thought he was “popping pills and who-knows-what-else” around their kids.

Usher denies the drug abuse allegations and is asking for an increase in the time he’s allowed to spend with his children. For now, the pair currently share custody.

Drugs or no drugs … Usher is probably a better fit parent than a sober Tameka. Or maybe SHE‘s the one on drugs.

Be the first to receive breaking news alerts and more stories like this by subscribing to our mailing list.