WASHINGTON — A federal judge on Thursday fined Education Secretary Betsy DeVos for contempt of court, ruling that she had violated an order to stop collecting on loans owed by students from a now-defunct for-profit chain of colleges.

Magistrate Judge Sallie Kim of the Federal District Court in San Francisco ordered the Education Department to pay a $100,000 fine. The money will go toward various remedies for students who are owed debt relief after President Barack Obama’s Education Department found they were defrauded by the chain, Corinthian Colleges, which collapsed in 2014.

The ruling is a victory for the more than 60,000 students who have been on a financial roller coaster since Corinthian imploded, after state and federal officials found that it lured students through deceptive recruitment practices and falsified job placement rates.

The decision stems from a class-action lawsuit filed in 2017 by the Project on Predatory Student Lending of the Legal Services Center of Harvard Law School and the group Housing and Economic Rights Advocates, both of which represent former Corinthian students. For more than a year, the students’ lawyers argued that Ms. DeVos had illegally punished thousands of cheated students who were owed relief from the federal government.