(Photo: Aaron Bernstein / Reuters)

Education Secretary Betsy DeVos on Wednesday was on the losing end of a lawsuit accusing the Department of Education of illegally delaying regulations set by the Obama administration to protect student loan borrowers from predatory colleges.

Attorneys general from 19 states and the District of Columbia filed the lawsuit against DeVos after her department began rolling back the so-called borrower defense rules, which were set to take effect on July 1, 2017.

U.S. District Court Judge Randolph Moss ruled in favor of the attorneys general, calling DeVos’ attempts to delay the Obama-era rule from its start date “unlawful,” “arbitrary and capricious” and “procedurally invalid,” according to the opinion.

Massachusetts Attorney General Maura Healey celebrated the judge’s ruling, saying in a tweet that the federal court “agreed that the actions of the [Education Department] are not only wrong, they are illegal.”

“It’s time for the #BorrowerDefenseRule to go into effect and give thousands of students the relief they’ve been waiting for,” she added.”

Sen. Elizabeth Warren (D-Mass.) congratulated Healey on the win.

“This is a crushing defeat for [DeVos], and a huge win for students who have been scammed by [for-profit] colleges,” Warren tweeted.

This is a crushing defeat for @BetsyDeVosED, and a huge win for students who have been scammed by #4profit colleges. Way to go Maura! https://t.co/dWuH8FTCeU — Elizabeth Warren (@SenWarren) September 12, 2018

The Obama administration overhauled borrower defense rules after receiving an “unprecedented influx” of fraud claims from Corinthian Colleges.

The for-profit education chain, which ran Heald College, Everest College and WyoTech, shut down in 2016 amid allegations of deceptive marketing and lying about grades and attendance records. Other for-profit colleges, including ITT Tech, shuttered after facing similar fraud accusations.

Story continues

The Obama-era regulations to protect students from the college’s predatory actions were finalized in October 2016.

DeVos delayed the effective date, citing a federal lawsuit filed by a trade association challenging the new rules.

In a press release at the time, DeVos called the Obama-era rules a “muddled process that’s unfair to students and schools.”

Moss has scheduled a hearing for Friday to address remedies for the situation.

Also on HuffPost

Love HuffPost? Become a founding member of HuffPost Plus today.

This article originally appeared on HuffPost.