LOS ANGELES — A court commissioner Monday issued a temporary restraining order against Rob Kardashian in response to the reality television star’s posting of explicit images of his ex-fiancee on social media last week.

Los Angeles Superior Court Commissioner James E. Blancarte granted the order based on filings by Kardashian’s ex Blac Chyna, who also claims he hit her in the thigh earlier this year, knocking her down and leaving her bruised.

“Rob has been violent with me in the past and I am afraid to be around him,” Chyna, whose real name is Angela White, wrote in court documents filed Monday in Los Angeles.

The order bars Kardashian from contacting Chyna or coming within 100 yards or her home, car or workplace. The order also prohibits him from posting images online of Chyna or the infant daughter they share.

Chyna’s attorney Lisa Bloom called the hearing “a complete and total victory.”

“The judge gave us everything we asked for,” she said.

The order will remain in effect until an Aug. 8 hearing.

Chyna sought a temporary restraining order Monday, less than a week after Kardashian went on a tirade against her on Instagram and Twitter, including posting explicit images of her.

Blancarte sealed exhibits in the case, citing their explicit nature. Bloom has accused Kardashian of cyber bullying.

Blancarte said his primary concern was the former couple’s infant child. Bloom said in court that nannies would handle custody transfers while the order is in place.

Kardashian did not appear at Monday’s hearing. His lawyer Robert Shapiro apologized on his client’s behalf.