Federal judges in two separate cases ruled this week that recent mass firings of employees as part of President Donald Trump’s push to cut the size of the federal workforce were illegal and ordered thousands of probationary employees to be reinstated — at least for now.

The Trump administration pushed back, filing appeals in both cases.

“This injunction is entirely unconstitutional,” White House press secretary Karoline Leavitt said Friday.

“You cannot have a low-level district court judge filing an injunction to usurp the executive authority of the president of the United States,” she added.

In the suit filed by federal employee unions, U.S. District Judge William Alsup of the Northern District of California said that the process had been a “sham,” as some employees were told they were being fired for poor performance.

Just before issuing his ruling Thursday, Alsup said, “It is sad, a sad day. Our government would fire some good employee and say it was based on performance when they know good and well that’s a lie.”

The departments of Agriculture, Defense, Energy, Interior, Treasury and Veterans Affairs were ordered to “immediately” rehire the employees. Alsup, however, noted that federal agencies may still proceed with reductions in force, following proper procedure.

Later Thursday, U.S. District Judge James Bredar also ruled that probationary employees must be reinstated after finding that 18 agencies had acted illegally in firing them. Democratic attorneys general representing the District of Columbia, Maryland and 18 other states argued that agencies failed to follow proper procedures for mass layoffs, including providing states with 60 days’ notice.

“Lacking the notice to which they were entitled, the states weren’t ready for the impact of so many unemployed people. They are still scrambling to catch up,” Bredar wrote in his memorandum explaining his decision.