The University of Pennsylvania has quietly agreed to pay a student accused of rape an undisclosed amount after he sued the school claiming Penn’s investigation into the incident violated his civil rights.

Although the specific terms of the agreement are not public, court records acknowledging the deal follow a rash of lawsuits nationwide filed by men on college campuses maintaining that punishment triggered by internal investigations into sexual misconduct have been biased against them.

According to the lawsuit filed last fall, the Penn student — identified only as John Doe — and a female student — also a Penn undergraduate and known as Jane Doe in the suit — met at a bar in June 2016 after they had completed their junior year. At the bar, flirting led to the young man walking the woman to his apartment about six blocks away.

The man asked if she wanted to come in for “some fun,” to which she responded that she was tired but agreed to join him “for just a few minutes,” according to court records.

The woman told Philadelphia police that, before she entered the man’s bedroom, he “pulled her into the house while holding her hand and using his other arm to hold her around her neck, head and hair.”

“Afterwards,” the man’s lawsuit later stated, “Jane stayed and cuddled with plaintiff, asked that he set an alarm so that she could get to work in the morning.”

She later told her roommate that she had been raped.

The woman filed a complaint with the university, which sent a sexual violence investigative officer to interview the accused man. He maintained that the sexual encounter was consensual and that neither of them was drunk.

A Penn report later concluded that the woman did not consent, recommending that the man be expelled from campus for two years and that the violation of the school’s sexual violence policy appear forever on his academic transcript.

The man appealed the punishment, but the school overruled it.

The man’s two-year suspension was put on hold until his lawsuit was resolved. During that time, he completed his coursework to earn a degree at Penn’s College of Arts and Sciences, according to court records. But, in May, a week before he was set to graduate, Penn officials notified him that he would not be allowed to graduate because of a “disciplinary hold” on his transcripts.

His lawyers have argued in court papers that such a hold has “interfered with his ability to seek employment” and caused him “permanent and irreparable” harm.

Attorneys working on both sides would not comment on whether he received his degree as part of the settlement of the suit he filed after his fight to come back to campus failed.

The man, who is black, filed a lawsuit calling the investigation a “sham” and alleging it was racially biased. The accuser is white, and the man argued that the school’s investigation relied an image of him as the “young African-American male as aggressor.”

He sought more than $600,000 in damages.

In September, U.S. District Judge John Padova tossed out several of the plaintiff’s claims, including that the school’s investigation was racially motivated, finding no evidence for that argument.

Still, the judge refused to dismiss the entire lawsuit, allowing it to move forward on some allegations including that the university did not properly train investigators how to probe cases without gender bias, a technical violation of Title IX, the landmark 1972 federal law prohibiting sex discrimination in education. Traditionally, Title IX has been used to protect women on campus.

Increasingly, though, male students have used Title IX as a legal weapon to strike back after being expelled for sexual misconduct.

Nationwide, men have argued in lawsuits that measures taken to ensure that sexual abuse claims be taken seriously have amounted to over-corrections that have slanted internal investigations against men.

The actions against universities were largely in response to Obama-era guidelines requiring colleges to use as the standard of proof a “preponderance of evidence” in determining whether someone committed sexual assault. That was controversial because it is a standard lower than the bar in criminal court, where juries must be convinced “beyond a reasonable doubt” that a crime occurred.

In September, U.S. Education Secretary Betsy Devos reversed those guidelines, saying the Obama administration had gone too far in enforcing Title IX claims of sexual assault that amounted to colleges rushing to judgment about the guilt of the accused.

Although court records indicate that Philadelphia police searched the man’s home, it is unclear whether he was ever criminally charged.

Neither the man’s lawyer nor attorneys for Penn would comment on the out-of-court settlement.