Feb 27 (Reuters) - A federal judge in Texas on Tuesday ruled that a $1.7 trillion government funding bill was unconstitutionally passed in 2022 through a pandemic-era rule that allowed lawmakers in the U.S. House of Representatives to vote by proxy rather than in person.

U.S. District Judge James Wesley Hendrix in Lubbock reached that conclusion as he granted Republican Texas Attorney General Ken Paxton's request to block a provision of that bill that gave pregnant workers stronger legal protections.

The judge called the scope of his ruling "limited," and said it did not block all of the spending law. Texas had only sought to block two provisions ultimately.

Hendrix, an appointee of Republican former President Donald Trump, blocked the Pregnant Workers Fairness Act from being enforced against the state as an employer after finding the funding bill was wrongly passed.

That law requires employers to provide pregnant workers with reasonable accommodations. The injunction Hendrix issued only applies to state government employees and not other workers in Texas.

Paxton, in a lawsuit filed last year, argued the spending package enacted in December 2022 was unconstitutionally passed as more than half of the House, then led by Democrats, were not physically present to provide quorum and voted by proxy.

Then-Speaker Nancy Pelosi helped implement the proxy voting rule in May 2020 following the onset of the COVID-19 pandemic as an emergency measure. It was ditched when Republicans took control of the House following the 2022 elections after an earlier unsuccessful court challenge.

In a 120-page ruling, Hendrix said that for over two centuries before the "novel" proxy voting rule's adoption, Congress understood that the Constitution's quorum clause required a majority of members of the House or Senate to be physically present to have quorum to pass legislation.

"Supreme Court precedent has long held that the Quorum Clause requires presence, and the Clauses text distinguishes those absent members from the quorum and provides a mechanism for obtaining a physical quorum by compelling absent members to attend," he wrote.

The U.S. Department of Justice, which defended the bill on behalf of Democratic President Joe Biden's administration, had no immediate comment.

Matthew Miller, a lawyer with the conservative Texas Public Policy Foundation who represented the state, said the ruling "correctly" concluded a physical quorum was required.

While Hendrix ruled in Texas' favor, he found the state lacked standing to challenge $20 million appropriated in the bill to fund a pilot program that provided voluntary case management and other services to noncitizens in immigration removal proceedings. (Reporting by Nate Raymond in Boston, Editing by Alexia Garamfalvi and David Gregorio)