The US Supreme Court tossed out President Joe Biden’s plan to slash the student debt of more than 40 million people, rejecting one of his signature initiatives as exceeding his power.

The justices, voting 6-3 along ideological lines, sided with six Republican-led states that sued to challenge the program, which by one estimate would have cost $400 billion over 30 years.

Writing for the court, Chief Justice John Roberts said the administration was “seizing the power of the legislature” by trying to cancel more than $400 billion of student debt.

Biden is likely to face renewed pressure from lawmakers and loan-relief advocates to find an alternative way to cancel debt, possibly using a different legal rationale. For now, the high court ruling strips him of an accomplishment as he looks toward his reelection bid next year.

Student loan payments are set to resume in late August after a three-year pause. Millions of people could fall behind on their debt.

The three liberals said the court should have concluded the states lacked the legal right to challenge the loan relief. “In every respect, the court today exceeds its proper, limited role in our nation’s governance,” Justice Elena Kagan wrote for the dissenters.

The conservative-dominated Supreme Court has thwarted Biden’s agenda on multiple occasions. The court stopped Biden from blocking evictions during the pandemic and requiring workers to get Covid vaccines or regular tests. The justices have also slashed the Environmental Protection Agency’s power to address climate change and protect wetlands.

Biden’s plan would have forgiven as much as $20,000 in federal loans for certain borrowers making less than $125,000 per year, $250,000 for households.

The administration contended the student-loan program was authorized by a 2003 law that gives the education secretary special powers when responding to national emergencies. The law, known as the Heroes Act, says the secretary can “waive or modify” provisions to ensure that debtors “are not placed in a worse position financially” because of a national emergency.

The case is Biden v. Nebraska, 22-506.