Ms. Moussa has attained a measure of fame in recent months, using her platform to talk crudely about sex and to entertain her followers in an insolent and confrontational manner in vulgar Moroccan Arabic. That has made her an object of fascination and horror to her more than half-million followers.

And she is known to despise L.G.B.T.Q. people who do not make their sexual orientation known.

Yassine, a 22-year-old, said he was initially delighted to be picked to go live on Instagram with Ms. Moussa. But what felt like an honor rapidly turned into embarrassment and shock as Ms. Moussa compelled him to acknowledge that he was gay, threatening to post revealing photos showing him with another gay man. It is unclear how she obtained the photos.

“I was shocked and then very scared,” Yassine said. “She destroyed my life.”

He has since been forced to move out of the house of a family member and to use his savings to rent a small apartment in Tangier.

“Everybody is sending the video and saying bad things about me,” he said. “My mom, also, she’s very sad. She’s not talking to me anymore. My friends at the gym, friends I went to school with — they all blocked me.”

Many who saw the outing of Yassine were outraged and attacked Ms. Moussa, flagging her account to Instagram. That’s when she got angry and suggested downloading gay meeting apps, which led to the outburst of anti-gay violence.

“My dating life in Morocco was somehow OK as long as my partner and I were being super discreet and cautious,” said one gay man who asked to be identified only by his initials, N.A., and says his family hasn’t seen the photos. He has been staying with his grandmother and waiting in fear for something bad to happen.

Abdellah Taia, a prominent gay author and one of few to publicly declare his sexual orientation in Morocco, says that the state keeps people in a gray area, making them vulnerable to abuse and discrimination and forcing many into hiding.