A former Boston prosecutor – once celebrated by singer John Legend for his criminal justice initiatives -- was arrested Tuesday for allegedly raping a 25-year-old woman in New York City.

Adam Foss, 42, pleaded not guilty at his arraignment to one count each of first-degree rape and first-degree sexual abuse for allegedly forcing himself on the victim as she slept Oct. 21, 2017, at a Midtown Manhattan hotel. 

Before falling asleep, the woman repeatedly turned down Foss' sexual advances, according to the Manhattan District Attorney's Office.

Foss and the victim allegedly spoke on the phone and exchanged texts for about month before meeting at the hotel. 

FLORIDA SERIAL KILLERS CHARGED IN A PAIR OF 1983 RAPE AND MURDER COLD CASE CASES 

Adam Foss accused of rape

Former Boston prosecutor and criminal justice crusader Adam Foss was arrested on rape charges in Manhattan on Tuesday Aug. 16, 2022.   (Stephanie Zollshan/Associated Press)

"I thank this brave survivor, who had the courage to come forward and share her story," said Manhattan DA Alvin Bragg, who urged anyone who believes they may be a victim of a sex crime to contact 212-335-9373. 

Foss' high-powered attorney, Robert Gottlieb, said there are troubling racial overtones in the prosecution of his client.

ALLEGED ‘CULT MOM’ LORI VALLOW MENTALLY COMPETENT TO STAND TRIAL, IDAHO JUDGE SAYS

"The charges are preposterous," he told Fox News Digital. "This case is very disturbing considering the historical and stereotypical dynamics involving White women and Black men and the issues raised in this case."

He continued, "The day after this alleged crime, the complaining witness sent our client numerous texts as well as engaged in sexting." 

Chrissy Teigen and John Legend

John Legend, pictured with wife Chrissy Teigen, distanced himself from criminal justice reformer Adam Foss after sexual misconduct allegations surfaced.   (Photo by Axelle/Bauer-Griffin/FilmMagic)

It was only after Foss ended the relationship that the complainant, who is White, made the allegation, Gottlieb said.

It wasn't the first time Foss was accused of inappropriate behavior. After working as a prosecutor in the Suffolk County District Attorney's Office in Boston from 2008 to 2016, he left to found now-defunct nonprofit Prosecutor Impact.

SEX OFFENDER ARRESTED AFTER ALLEGEDLY SAYING HE WOULD 'RAPE THE FIRST WOMAN HE SEES,' ARKANSAS SHERIFF SAYS

After his departure, several interns accused him of misconduct, and the Suffolk County DA launched a probe.

"The investigation showed that his behavior was troubling but not criminal for incidents alleged to have taken place in this office," Suffolk County DA spokesman Jim Borghesani told Fox News Digital. "That investigation had nothing to do with this incident."

After collaborating with Foss, Legend distanced himself from the criminal justice crusader, whose nonprofit trained prosecutors to focus on reform rather than incarceration. 

"In 2015 we (my org @freeamerica, @tystiklorius and I) helped elevate Adam John Foss and the concept of progressive prosecutors. I later learned that he used his platform to harm women," Legend wrote on Twitter in 2021

CLICK HERE TO GET THE FOX NEWS APP

"He used my name and association to gain credibility, and while we are committed to a world where people's lives aren't defined by their mistakes, it's unacceptable to use one's power and influence to harm women," continued the "Hard Times" crooner.