Blurred Lines singer Robin Thicke must stay away from his ex-wife Paula Patton, a judge has ordered, and only have monitored visits with his six-year-old son.

Los Angeles Superior Court judge Colin Leis issued a temporary restraining order after Patton accused of physically abusing her during their marriage.

The Hitched actress also said Thicke, 39, had traumatised her and her son by demanding visitation and refusing to leave her mother's home last week.

In a court filing, Thicke's lawyer Larry Ginsberg opposed the order, saying there was no basis to it.

Ginsberg argued that Thicke was seeking sole custody of his son and accused Patton of manipulating the boy.

Robin Thicke and Paula Patton ended their marriage in March 2015. Credit: AP

In court declarations, Patton included several allegations that Thicke was abusive during their marriage.

She claimed that he pushed her to the ground and kicked her during an altercation in April 2013.

Patton also accused him of numerous infidelities during their marriage and having a substance abuse problem.

The order, which will continue until a hearing on February 24, includes a finding that Thicke has a history of domestic violence and there is a risk he could flee with his son.

He has been restricted from travelling outside Los Angeles County with the boy.

The bitter custody battle erupted earlier this month after child services launched an investigation looking into allegations that Thicke had physically abused the six-year-old.

His lawyer acknowledged that Thicke spanked his son, which is allowed by law, but denied abuse.

Patton's petition was supported by declarations from her son's school, who asked child welfare workers to investigate.

Investigators cleared Thicke of any wrongdoing, the court papers said.