A 17-year-old was raped by a man with whom she had been drinking and her 18-year-old female friend livestreamed the attack on the social media app Periscope, a prosecutor in Ohio said Wednesday in announcing a rape and kidnapping indictment.

Authorities learned of the assault when an out-of-state friend of the accused woman saw the images, Franklin County Prosecutor Ron O'Brien said.

Marina Lonina and Raymond Gates, 29, were charged with rape, kidnapping, sexual battery and pandering sexual matter involving a minor. The rape charge involved intercourse by force and was not related to the 17-year-old's age, O'Brien said. Lonina was also charged with illegal use of a minor in a nudity-oriented material or performance.

Lonina and the victim were socializing with Gates at a home in Columbus on Feb. 27 when Gates raped the 17-year-old, O'Brien said.

Lonina had also livestreamed pictures of the girl in the nude the night before at Lonina's house, he said.

Lonina "categorically denies these charges," said her attorney Josh Bedtelyon.

Gates is scheduled for arraignment Friday. Court records don't list an attorney for him who could comment on the charges.

They each face up to 40 years in prison, if convicted.

O'Brien said the motive for the livestreaming was unclear, but he said alcohol was a factor. Gates, Lonina and the victim had all been drinking, he said.

"People need to know and understand that the use of a smartphone to video events can constitute serious felony crimes," O'Brien said. "They should think twice before they use their smartphones to either photograph or video anything that's of a sexual nature."