Columbia University has reached a settlement with a former male student who had been accused of raping “mattress girl” Emma Sulkowicz, according to a report.

A lawyer representing Paul Nungesser issued a statement announcing a settlement in the Title IX lawsuit from 2015 in which the Columbia grad alleged gender discrimination by the university.

“Together with Paul and his parents, we have fought for three long years,” said lawyer Andrew Miltenberg, according to the Washington Post.

“It gives Paul a chance to go on with his life and recover from the false accusation against him. We hope that the resolution of the case also ensures that no student will ever have to endure what Paul went through after he was exonerated.”

In the case that attracted national attention, Sulkowicz protested against the school’s handling of her sexual–assault allegations by hauling a mattress around campus.

Sulkowicz claimed that Nungesser, her classmate, had raped her during her sophomore year in 2012 – but he was cleared after a university investigation.

Details of the settlement were not released, but Columbia released a statement saying Nungesser was found not responsible for sexual misconduct “after a diligent and thorough investigation. Columbia University stands by that finding.

“Columbia recognizes that after the conclusion of the investigation, Paul’s remaining time at Columbia became very difficult for him and not what Columbia would want any of its students to experience,” the administration said.

“Columbia will continue to review and update its policies toward ensuring that every student — accuser and accused, including those like Paul who are found not responsible — is treated respectfully and as a full member of the Columbia community.”

Police also declined to pursue charges against Nungesser.

He claimed that Columbia had violated his rights under Title IX, the law that prohibits sex discrimination in federally funded schools, by “abetting the woman’s gender-based harassment,” according to his lawyers.

In March, a federal judge in Manhattan tossed Nungesser’s latest lawsuit, which sought to hold the Ivy League school responsible for the backlash and humiliation he suffered from Sulkowicz’s rape allegations.

Judge Gregory Woods said Nungesser could not prove he was harassed based on his gender and tossed the lawsuit “with prejudice” — meaning that Nungesser was forbidden from trying a third time.

Miltenberg said that after the setbacks, Nungesser had prepared an appeal before settling with Columbia.

The lawyer said the resolution allows Nungesser — who is pursuing a career as a filmmaker — to focus on his future.

“I think this case fits into the larger debate in that the mark of being called a rapist is a significant one, and it follows you regardless of whether or not the university finds you responsible,” Miltenberg said.

“It highlights in a way how polarizing the topic is and how much damage can be done just by having to go through the process, let alone worrying about whether it’s going to be handled fairly or not,” he added.

Sulkowicz, who was not named as a party in the case, did not return requests for comment.