robin thicke paula patton
Singer Robin Thicke and actress Paula Patton, arrive at the 56th annual Grammy Awards in Los Angeles, Jan. 26, 2014. REUTERS/Danny Moloshok

Paula Patton and Robin Thicke's custody battle for their 6-year-old son, Julian, turned nasty after the actress accused the singer of physically assaulting her, cheating on her and having a serious cocaine problem, according to court documents obtained by Us Weekly. The former couple appeared in a Los Angeles court Thursday to seek temporary sole custody of their son.

Thicke’s request for temporary sole custody was denied by the judge, who granted Patton's request for a temporary domestic violence restraining order, which would keep the 39-year-old star at least 100 yards away from her, their son Julian and her mother, Joyce Patton, according to TMZ.

“[Patton] is in reasonable apprehension of imminent serious bodily injury to herself and the child,” the actress’ attorney, Larry Bakman, wrote in the request. Patton alleged in her domestic violence restraining order request that “Robin had a temper and could be volatile at times.”

The 41-year-old actress detailed some of the incidents in the 52-page request, including Thicke threatening her life on multiple occasions, and around Valentine’s Day 2013, attempted to cheat on her with another woman in their bungalow at the Chateau Marmont.

"When I confronted Robin about this, he admitted to having attempting to have sex with the stranger, but stated that he ended up being unable to do so because the amount of cocaine he used that evening that caused him to be unable to perform," she alleges in the papers.

According to court documents, the ex-couple also went to one marriage counseling session, and Thicke also admitted to "a drug and alcohol problem and that it was affecting his behavior."

Thicke and Patton, who married in 2005 after dating since they were teenagers, welcomed their son Julian in April 2010. The two announced their split in February 2014 after almost nine years of marriage, and their divorce was finalized in March 2015.