WASHINGTON (AP) — A federal judge on Wednesday cleared the way for President Donald Trump ’s plan to downsize the federal workforce with a deferred resignation program.

It was a significant legal victory for the Republican president after a string of courtroom setbacks .

“This goes to show that lawfare will not ultimately prevail over the will of 77 million Americans who supported President Trump and his priorities,” said White House press secretary Karoline Leavitt.

There was no immediate response from labor unions that had sued over Trump’s plan.

U.S. District Judge George O’Toole Jr. in Boston found that the unions didn’t have legal standing to challenge the program, commonly described as a buyout.

Trump wants to use financial incentives to encourage government employees to quit. According to the White House, tens of thousands of workers have taken the government up on its offer.

The deferred resignation program has been spearheaded by Elon Musk, who is serving as Trump’s top adviser for reducing federal spending. Under the plan, employees can stop working and get paid until Sept. 30.

Labor unions argued the plan is illegal and asked for O’Toole to keep it on hold and prevent the Office of Personnel Management, or OPM, from soliciting more workers to sign up.

A Justice Department lawyer has called the plan a “humane off ramp” for federal employees who may have structured their lives around working remotely and have been ordered to return to government offices.