A federal judge ruled Thursday for House Republicans in a challenge brought against the Obama administration over the legality of payments to insurers under ObamaCare.

U.S. District Judge Rosemary Collyer ruled the spending unconstitutional -- while putting the decision on hold pending appeal. 

The ruling Thursday marks a win for House Republicans who brought the politically charged legal challenge, and a legal setback for the administration.

“Today’s ruling by the DC federal court is an important step toward restoring the separation of powers and stopping President Obama’s power grab. The Constitution is very clear: it is Congress’ job to write our laws and it is the President’s duty to enforce them,” House Judiciary Committee Chairman Bob Goodlatte, R-Va., said in a statement. 

At issue was a $175 million program authorizing payments to insurers that Republicans claimed were not appropriated by Congress. On the question of whether the money could be distributed anyway under another program, Collyer wrote in her opinion: “It cannot.”

“None of the Secretaries’ extra-textual arguments – whether based on economics, 'unintended' results, or legislative history – is persuasive,” she wrote. “The Court will enter judgment in favor of the House of Representatives and enjoin the use of unappropriated monies to fund reimbursements due to insurers” under that section. 

Collyer said the law is "clear," and money was not allocated for that program. 

She then said she would stay the injunction, giving the administration a chance to appeal. Collyer, with the U.S. District Court for the District of Columbia, is a George W. Bush appointee nominated in 2002. 

The controversial payments to insurers were meant to reimburse them over a decade to reduce co-payments for lower-income people.

The House argued that Congress never specifically appropriated that money and denied an administration request for it, but that the administration is spending the money anyway. 

The White House previously described the case as a "partisan attack" and predicted it would be dismissed. 

Asked Thursday about the latest decision, White House Press Secretary Josh Earnest said this isn’t Republicans’ first legal fight over ObamaCare but warned “they’ll lose it again.”

He reiterated that the administration is confident in its legal arguments here. 

The administration is expected to appeal Thursday's ruling to the U.S. Court of Appeals for the District of Columbia Circuit.

The Associated Press contributed to this report.