PROVIDENCE, R.I. — A federal judge on Wednesday threw out a lawsuit brought against Brown University by a student from another college who said her rights were violated when she was raped by three Brown football players.

U.S. District Judge Jack McConnell said the woman, who attended Providence College and is identified in the lawsuit as Jane Doe, cannot bring a Title IX sex discrimination lawsuit against the Ivy League university because she’s not a student there.

McConnell called the allegations very serious but wrote, “Laws put into place to protect students from sexual discrimination in educational programs were not meant to address all instances of sexual assault occurring in the college environment.”

“This is a difficult conclusion to reach in the face of Ms. Doe’s arguments that Brown and other schools may act or continue to act with deliberate indifference to sexual harassment and violence on its campus,” McConnell wrote.

The lawsuit, filed in 2016, said Brown failed to complete a disciplinary investigation after the woman was attacked in a Brown dormitory in 2013. It was brought under Title IX, a federal civil rights law that prohibits sex-based discrimination in federally funded programs.

The woman, who lives in Massachusetts, said in the lawsuit that she felt forced to withdraw from Providence College because she feared for her safety on her own college campus and in the general Providence area.

Her lawyer, Wendy Murphy, said they plan to appeal. Murphy called the ruling unusual and troubling and said the language of Title IX does not limit its protections to students.

“As long as you’re an elite member of Brown’s community, you’re protected,” she said. “If you’re a member of a lowly neighborhood university, you’re not protected.”

A Brown spokesman, Brian Clark, said they were pleased with the decision.

“Brown takes every allegation of sexual misconduct seriously and this case was no exception. We remain fully confident in the decisions made at Brown related to Jane Doe’s allegations,” he said in an email.

Clark would not comment on whether the players were still at Brown, citing student privacy considerations. A grand jury declined to bring charges against two of the players in 2014.