Nearly two years ago, Utah Latino activist Tony Yapias was arrested and charged with sexually assaulting a woman after she had broken off their long-term relationship.

During that time, Yapias said he was innocent.

And on Friday, he pleaded guilty to two misdemeanor charges in connection to the March 2016 encounter when the woman said he forced himself on her — neither of which were sex crimes.

Instead, he pleaded guilty to tampering with evidence, admitting he deleted text messages the woman sent to him, messages in which she said she did not want to see him. He also pleaded guilty to unlawful detention, admitting that he had kept her in her home longer than she wanted to be.

He faces a maximum penalty of up to 18 months in jail when he is sentenced Sept. 30.

Yapias, whose full name is Adolpho Tony Yapias-Delgado, had initially faced a charge of rape, a first-degree felony.

But Davis County Attorney Troy Rawlings said Friday that he did not have enough evidence to prove to a jury beyond a reasonable doubt that the woman did not consent to having sex. He described it as a “he-said, she-said” case.

Rawlings said that while the victim in the case supported the plea deal, she maintains that she did not consent to having sex.

“Had this case gone to trial, had she testified, her story would have remained consistent,” Rawlings said. “It has not altered.”

Yapias said after the court hearing that he “took ownership” of what he did that evening — but maintained that he did not sexually assault her.

“I’m going to stand by my story, too,” he said.

Yapias is the director of Proyecto Latino de Utah, which works on immigration and Latino issues. The Peru native was director of Utah’s Hispanic Affairs Office and has had several radio shows for Spanish-speaking audiences.

Charging documents allege that on March 21, 2016, Yapias went to the woman’s South Salt Lake home — despite her admonition in text messages that he stay away — to try to talk about her decision to end their relationship, which had lasted about four years.

The woman initially refused to let Yapias into the home, court documents state, but he pushed his way through the door when she opened it to go outside.

The woman again told Yapias she had no interest in continuing their relationship and did not want to have sex.

Yapias told investigators that he had sex with her, but he said the woman consented because she removed her clothes, charges state.