About 1,500 students who attended two art institutes that were part of the sudden collapse of a career-school chain this year will have their federal loans canceled, Education Secretary Betsy DeVos said on Friday.

It was a rare victory for borrowers seeking debt relief from a department that, under Ms. DeVos, has frozen or curtailed relief programs for students who claim that schools defrauded them. Borrowers who attended the two schools, the Art Institute of Colorado and the Illinois Institute of Art, sued the department last month, seeking to have their loans eliminated.

“Students were failed and deserve to be made whole,” Ms. DeVos said. Students who attended the schools from late January 2018 through the end of last year, when they shut down, will have their loans for that period canceled, the department said.

Borrowers will still generally owe on federal loans they took out before Jan. 20, the department said in an email sent to borrowers on Friday. Some people, however, may qualify to have all of their loans eliminated through the department’s closed school discharge program.