Princeton University is ending its five-year legal battle with a student who brought a disability accommodation suit against the school after he was banned from campus over a suicide attempt.

U.S. District Judge Peter Sheridan of the District of New Jersey terminated the case in a June 11 order after receiving notice from the parties that a settlement had been reached. The agreement brings an end to a suit that claimed the university failed to accommodate the plaintiff’s disability and discriminated against him by imposing conditions on his return that were tougher than those placed on students who leave for a physical illness.