HARTFORD, Conn. (AP) — A federal judge has issued a temporary order requiring the University of Connecticut to reinstate a male student who had been banned from campus for two years amid a sexual misconduct investigation.

The student, referred to in court documents as John Doe, said in a lawsuit that UConn denied him of his due process rights, according to a report in the Hartford Courant published Saturday.

The senior male student has been accused by a female student, identified in court documents as Jane Roe, of having non-consensual sex with her in her dormitory room in April. The male student says the encounter was consensual and initiated by the woman.

A UConn investigator dismissed Doe’s account of events after a single interview and the school blocked him from enrolling in his final semester, according to the suit. As the disciplinary process continued, Doe was denied specifics of the complaint and not permitted to question any witnesses against him or present witnesses of his own, according to the suit.

U.S. District Judge Michael Shea in his ruling said the male student had shown that UConn’s procedures for investigating alleged misconduct and imposing discipline are so one-sided that he was denied an opportunity to present his side of events.

“Despite the importance of credibility to the factual dispute, UConn’s disciplinary procedures hampered the plaintiff’s ability to present a meaningful defense on this issue," the judge wrote.

Shea will decide whether to continue his order after an extended hearing on Feb. 11.

Doe’s lawyer, Michael Thad Allen, said Shea’s order “demonstrates that UConn has systemic problems with their assessment of credibility and lack of due process, which have to be corrected.”

The office of state Attorney General William Tong, which is defending he university, declined to comment.