The congressional republicans won a case against US President Barack Obama’s signature health care laws, more commonly known as the Obamacare. A federal judge on Thursday ruled that the subsidies under the health care law fell beyond the administration’s powers relating to government spending.

US District Judge Rosemary Collyer passed the ruling, stating that the government cannot spend billions of dollars from the federal funds to provide entitlements to private insurers unless the Congress approved of it.

Under the Obamacare laws, insurance companies offering health care coverage through the law can offer to reduce out-of-pocket costs for the policy holders. The added cost borne by the insurance company would be reimbursed by the government, CNN reported. But according to the arguments put forward by the lawyers representing the House, those reimbursements were not properly approved by the Congress.

The judge backed the Republicans but said she would stay her ruling pending appeal. “Congress is the only source for such an appropriation, and no public money can be spent without one,” she wrote.

The ruling would cast uncertainty over the achievements of the Obamacare policy ahead of the November 8 presidential elections, Reuters reported.

“Judge Collyer’s opinion is a resounding victory not just for Congress but for our constitutional system as a whole,” Jonathan Turley, a lawyer for the House, said in a statement. “We remain a system based on the principle of the separation of powers and the guarantee that no branch or person can govern alone. It is the very touchstone of the American constitutional system and today that principle was reaffirmed in this historic decision.”

According to Reuters, insurers have reportedly incurred losses as a result of the Obamacare policy, as they have not been able to attract too many healthy customers to balance the costs of the sicker members.

Former House Speaker John Boehner, who was leading the efforts behind the suit, called the ruling “a victory.” “Today’s Obamacare decision is a victory for the American people, and for House Republicans, who have stood firm for the rule of law,” he tweeted.