A Prince George’s County woman faced a chilling nightmare when her ex-husband, who already had physically assaulted and stalked her, began posting photos of her and her children online, soliciting sex on their behalf.

Michael A. Johnson II, 33, of Hyattsville created online ads with abhorrent titles advertising sex with his ex-wife, according to court papers. About 50 men showed up at her house; some tried to break in. One stranger, the woman said, even pulled down her young daughter’s pants.

“It’s hard to imagine doing this to someone you once loved,” Prince George’s County Circuit Judge Maureen M. Lamasney said Thursday before sentencing Johnson to 85 years in prison.

The case is among several nationwide in which people have been accused of stealing their victim’s online persona and using social media as a weapon.

The woman told The Washington Post in a recent interview that she resorted to buying a shotgun and staying up all night pointing it at the door. She said she found several fake profiles in her name on sites including Facebook and the pornography aggregator XTube. One of the ads, titled “Rape Me and My Children,” offered up her three children for sex and included their photos.

“This wasn’t just a case of him sending e-mails,” the woman said in court. “He changed my life and my children’s lives forever.”

“We felt like refugees in our own home. No one should have to live like that,” added the woman, who asked not to be identified for fear of continued harassment.

In court, the woman described how she had saved to buy a condominium that was supposed to be a place where her children could grow up and which she could pass on to them. Instead, the family was forced to move, and she went from making just under $60,000 a year to minimum wage, she testified.

She broke down as she recounted an incident in which one of the men who had seen an ad on Craigslist found her daughter outside and pulled down her pants, leaving only when her son came over.

The woman had obtained a restraining order against her ex-husband after he assaulted her in 2011, wrapping his hands around her neck, according to court documents. After that, the cyberterror began in earnest.

In June, Johnson was convicted of more than 70 counts, including stalking, reckless endangerment and violations of a protective order. In addition to the 85-year term, he was sentenced to serve 30 years that will run concurrently.

Assistant State’s Attorney Christina T. Ropella said in court that the woman and her children would never feel safe if Johnson were not in prison.

“He’s a dangerous man,” Ropella said. “The best way to protect them is for him to be incarcerated for as long as possible.”

Johnson’s attorney, public defender Jason Ricke, noted that nobody had been physically hurt. But Lamasney said Johnson’s conduct was threatening.

“She was never physically injured but threatened with death . . . and rape by innumerable strangers,” Lamasney said. “The real tragedy of this case is that most people don’t need to be told by a judge not to behave this way.”

Johnson, who was an unemployed computer specialist at the time of the incidents, addressed the court softly and could barely be heard.

“I love my children even though they are not biologically mine,” he said, apparently referring to his ex-wife’s children. “I would never put them in any harm.”

Lamasney noted that Johnson had violated a protective order against his ex-wife dozens of times, ignoring three judges who had ordered him to leave her alone.

“I would have to be a total idiot to think you would follow my orders when you ignored three judges before me,” Lamasney said.