R&B singer Usher will hold on to primary custody of his two young sons after a judge dismissed an emergency request by his ex-wife.

Tameka Foster Raymond went to court to seek temporary custody of the children after their five-year-old son was caught in a pool drain while in the care of the star's aunt at his Atlanta home.

Fulton County Superior Judge John Goger dismissed her request for decision-making authority after hearing from both sides in court.

After the judge issued his ruling, multi-Grammy winner Usher approached his ex-wife, who broke down while testifying, and gave her a long hug.

Tameka Raymond reacts while listening to 911 call of son's near drowning

Based on the evidence presented at the hearing, Judge Goger said he was not certain anyone really could have done anything to prevent the accident.

But he also advised the 34-year-old singer to keep his ex-wife up to date with his whereabouts and who is taking care of the children.

Usher Raymond V fell to the bottom of the pool and became stuck in the drain on Monday, according to an Atlanta police report.

A housekeeper tried unsuccessfully to free him. A contractor doing work at the home pulled the boy from the pool and performed CPR.

The boy was "conscious, alert and breathing" when emergency medical workers arrived, police said. He was still in hospital Friday.

The filing had said the boy "suffered a near-death accident" while left unsupervised at Usher's home when the singer was out of town.

The former couple went through a custody battle after divorcing in 2007

Usher, who has recorded multi-platinum R&B albums My Way and 8701, left the courthouse without speaking to reporters. He also has several chart-toppers including Nice & Slow, U Remind Me and Love in This Club.

The pool accident comes nearly a year after Ms Raymond's 11-year-old son, Kile Glover, Usher's stepson, died from injuries he suffered when he was run over by a personal watercraft on Lake Lanier northeast of Atlanta.

Ms Raymond, who is a hair and wardrobe stylist, was emotional during her testimony, at one point sobbing so hard that she had to step down from the witness stand to regain her composure.

"He doesn't confer with me regarding anything," Ms Raymond said, explaining that she never knows where Usher is, where the children are and who's taking care of them.

Usher travels frequently and uses caregivers, including his aunt, who are not trained and qualified to care for young children, Ms Raymond said.

Judge Goger said he thought Ms Raymond's standards for a caregiver were unusually high and pointed out that many people leave their children with family members.

Usher and Ms Raymond married in 2007 and divorced two years later.

They went through a lengthy child custody battle, and Usher was given primary custody of the boys, who are about a year apart in age.