Usher will continue to have primary custody of his two young boys after the near-drowning of one of his two sons. Usher’s ex-wife and the boys’ mother, Tameka Foster, filed for an emergency custody hearing after 5-year-old Usher Raymond V almost drowned in a pool Aug. 5. However, an Atlanta judge sided with the singer Friday, dismissing Foster’s request for temporay primary custody.

Usher was given primary custody of his sons Usher and Naviyd, 4, when the former couple’s extremely heated custody battle finally came to an end last year.

In court Friday, Foster contended the pool incident proves Usher is not surrounding their sons with competent care providers and isn’t being a watchful father, TMZ reported.

But Usher’s attorney argued that his client is an exceptional dad who takes care of his sons at all times. Usher added that a similar pool accident could happen to anyone.

Following the judge’s ruling, Usher and Foster briefly put their issues aside -- taking a moment to share a hug and a few words.

Usher Raymond V remains in a hospital. Foster said the hospitalization is necessary because of health issues -- such as a low heart rate -- associated with his near-drowning. 

Last year, Foster’s 11-year-old son from a previous marriage, Kile Glover, was killed in a watercraft accident. Sources close to her said this loss helped to motivate her to call for the emergency hearing, the  Daily Beast reported.

“This isn’t just Tameka being hateful, and she can be that way for sure,” a family member said. “Kile’s death broke her heart, and the mere thought of another child of hers dying in a tragic way is really more than she can bear. You have to feel sorry for her with this happening.”

Watch Usher’s and Tameka’s hug in the video below:

  Usher and Tameka Hug It Out