The prosecutor’s office said Ms. Lonina and the victim, friends from the same high school outside Columbus, met Mr. Gates for the first time while hanging out at a shopping mall in the city, the day before the alleged assault. He proposed meeting the next day.

Image Raymond Gates, 29. Credit... Franklin County Sheriff's Office, via Associated Press

On the evening of Feb. 27, all three were gathered at a residence in Columbus where Mr. Gates pinned the 17-year-old down and raped her as Ms. Lonina used Periscope, an app owned by Twitter, to live-stream the attack, the authorities said.

A friend of Ms. Lonina’s in another state saw the video and contacted the authorities.

Both defendants pleaded not guilty on Friday.

Mr. O’Brien, the prosecutor, said Ms. Lonina had apparently hoped that live-streaming the attack would help to stop it, but that she became enthralled by positive feedback online.

“She got caught up in the likes,” he said.

Ms. Lonina’s lawyer, Sam Shamansky, has portrayed his client as the victim of a much older man, who bought the teenagers a bottle of vodka.