A federal appeals court ruled Friday that a massive pandemic-era spending law passed during President Joe Biden’s administration was unconstitutional because many lawmakers delegated other members to cast votes for them in their absence.

The members of Congress were allowed to vote by proxy for the 2022 measure due to accommodations in place while the risk of a potentially deadly coronavirus infection was still high.

But in a 9-8 ruling, the majority said proxy votes do not count toward a quorum under a clause in the US Constitution governing congressional meetings, making the law’s passage unconstitutional. A US district court judge made the same ruling in 2022.

The $1.7 trillion omnibus bill passed in the House that year with a 225 to 201 vote, with one member voting present. According to the appeals court opinion, 226 lawmakers voted by proxy.

Additionally, the appellate judges said in the majority opinion written by Judge Cory Wilson, a Trump appointee, that the government did not establish there was an “existence of an emergency” when it adopted proxy voting.

Legal experts had expressed concerns that a ruling against the law’s passage would have broad ramifications, affecting other bills that were passed with proxy votes. However, the opinion stressed that the ruling has a “narrow scope,” applying only to the enforcement of a provision in Texas that applies to workplace conditions for women who are pregnant.

Texas Attorney General Ken Paxton, who recently lost his bid for US Senate, brought the case in 2023 to block the Pregnant Workers Fairness Act — which mandates that some employers provide certain accommodations to pregnant workers — from being enforced in Texas. Friday’s ruling grants his request.

Meanwhile, Judge James Graves Jr., an appointee of former President Barack Obama, argued in his dissenting opinion, “Even though less than a majority was physically present at the time of the vote, no Member objected that a quorum was lacking.” He also took issue with the majority’s interpretation of the Constitution’s “Quorum Clause,” saying that mandating lawmakers to be physically present “shoehorns a much larger requirement into the Constitution.”

Besides setting up the Texas workplace law, the 2022 spending bill funded critical government operations across federal agencies and provided roughly $45 billion in emergency assistance to Ukraine and NATO allies, and around $40 billion for natural disaster relief.