ALBUQUERQUE, N.M. — The University of New Mexico will revise how it investigates sexual assault complaints under an agreement Monday with the U.S. Justice Department that comes nearly six months after a harsh federal report accused the school of failing in its handling of the cases.

The agreement calls for the school to ensure that victims know where to turn with a complaint and feel confident the response will be timely and impartial.

The school also must provide in-person training on dealing with sexual harassment and assault to all students and faculty — a measure the university says will cost $1.5 million over the next three years.

During an investigation that spanned more than a year, the Justice Department found University of New Mexico policies left students uncertain of how to report sexual assault and harassment or where to turn for help. It also described a confusing process with “significant gaps” in how school officials investigated complaints.

“There are student cases in the past that we didn’t handle as well as we should have,” University of New Mexico President Bob Frank told The Associated Press. “We’re concerned and sensitive to the fact that they now have pain they wouldn’t have had if we had been better at that point in time. But now we feel we’re headed in a better direction.”

The U.S. Department of Education has scrutinized schools nationwide over compliance with federal laws aimed at protecting women on campus. But only two — the University of New Mexico and University of Montana — have been targeted for investigation by the Justice Department over the handling of sexual assault reports.

In a statement, the Justice Department said the school in Albuquerque had already begun to take steps toward making its campus safer before the results of the federal investigation were released earlier this year.

The school is required to update federal officials on its progress in providing training and revising policies over a three-year monitoring period.

In return, the Justice Department won’t file litigation against UNM under federal laws — including Title IX — that prohibit gender discrimination at schools that receive federal funds and regulate institutions’ handling of sexual violence cases.

“Students have the right to live and learn in a safe educational environment, and this agreement provides the foundation that UNM will build on to ensure that this right is both recognized and respected,” said U.S. Attorney Damon Martinez.

The Justice Department launched its investigation after it received complaints from students who said they were left traumatized by school officials’ investigations into their claims. Some said they were reluctant to report assaults because they lacked confidence in the school’s response.

In one case, a student described how an investigator with the school’s Office of Equal Opportunity repeatedly called her assailant her “ex-lover,” despite her reporting that the two had no prior relationship, federal authorities said.

Another case was determined by university officials to have lacked “tangible” evidence showing an attacker had tried to strangle a woman, even though medical records showed she had redness and bruising on her neck, according to the federal probe.

Justice Department officials said university administrators and staff had dismissed allegations without properly weighing evidence, showed gender bias, and took as long as eight months to investigate complaints.

A school survey of students released earlier this year showed 65 percent are now familiar with school policies and about half said they know where to find help on campus if they need it.

“At the end of the day, we believe our policies and procedures are much stronger than they were,” Frank said.

The university serves some 28,000 students in Albuquerque