Democratic attorneys general from 18 states and the District of Columbia sued U.S. Education Secretary Betsy DeVos on Thursday over her decision to suspend rules that were meant to protect students from abuse by for-profit colleges.

The lawsuit, filed in federal court in Washington, says DeVos violated rule-making laws when she announced a June 14 decision to delay so-called borrower defense to repayment rules, which were finalized under President Barack Obama and scheduled to take effect July 1.

In her announcement saying the rules would be delayed and rewritten, DeVos said they created "a muddled process that's unfair to students and schools."

Education Department spokeswoman Elizabeth Hill called the lawsuit by attorneys generals "ideologically driven" and said the now-delayed rules suffered from "substantive and procedural flaws" that need to be addressed.

"That is why the Secretary decided it was time to take a step back and hit pause on these regulations ... to make sure these rules achieve their purpose: helping harmed students," Hill said in a statement.

The rules would have forbidden schools from forcing students to sign agreements that waive their right to sue. Defrauded students would have faced a quicker path to get their loans erased, and schools, not taxpayers, could have been held responsible for the costs.

A final version of the rules was announced last fall after nearly two years of negotiations. The Obama administration started pursuing new rules after the Corinthian Colleges chain shut down in 2015 amid allegations of misconduct, leading to a flood of applications from students seeking to get their loans forgiven.

Massachusetts Attorney General Maura Healey, who is leading the lawsuit against DeVos, said the regulation was a "common-sense measure" meant to protect students.

"Since Day One of the Trump administration, Secretary of Education Betsy DeVos and the administration have sided with for-profit schools over students," Healey told reporters. "For me and my colleagues, it's simple: When students and families are cheated out of an education and taxpayers foot the bill, everybody loses."

The lawsuit says DeVos and the Education Department failed to take legally required steps to delay already established rules. It says they failed to open the decision to public comment and failed to provide an adequate legal justification for delaying the rules, among other faults.

In June, the Education Department said it was delaying the rule because a federal court was weighing a lawsuit brought by a California trade group made up mostly of for-profit colleges seeking to block the rules. The department cited a law allowing such a delay for litigation if it's found "that justice so requires."

The attorneys general said that justification is "a mere pretext" for repealing and replacing the regulation.

The other states that joined the lawsuit are California, Connecticut, Delaware, Hawaii, Iowa, Illinois, Maryland, Minnesota, New Mexico, New York, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont, Virginia and Washington.

Last week, a group of 47 Democrats in Congress, along with independent Sen. Bernie Sanders of Vermont, sent a letter to DeVos opposing the delay, saying the department had never used litigation as a reason to delay rules.

A separate lawsuit against the Education Department was filed Thursday on behalf of two former students of a Boston-area for-profit college. The suit says the students were counting on protections in the new rules to sue the New England Institute of Art, which they say deceived them and left them with few job prospects and heavy debt. The school's parent company did not immediately comment.

"Secretary Betsy DeVos has effectively revoked students' rights under the rule while giving a pass to predatory schools that wield influence with this administration," said Julie Murray, an attorney for Public Citizen, a liberal think tank in Washington that's representing the students.

The lawsuits set up a legal battle that has been brewing outside the courts for months. Advocacy groups and some congressional Democrats have been gearing up for a fight to preserve Obama-era rules that were intended to hold for-profit colleges accountable, while the Trump administration has sought to roll back regulations it sees as burdensome.

Last Friday, DeVos said she was also suspending the new "gainful-employment" rule, another hallmark of the Obama administration that was set to take effect in July. The regulation would have cut off federal funding to career programs that consistently left students with more debt than they could afford. Data released by the Obama administration in January found that more than 800 programs across the country were failing to meet the rule's standards.