(Bloomberg) -- The House Judiciary Committee approved legislation to provide legal status to as many as 8 million undocumented immigrants, which Democrats intend to include in their massive tax and spending plan.

The panel approved the measure late Monday night, 25-19, after hours of debate and failed amendments from Republican members of the committee. 

The proposal would modify provisions in the green card process, make more visas available and provide a pathway to legal residency for undocumented immigrants brought to the U.S. as children, people with Temporary Protected Status and essential workers.

Yet whether those provisions make it into the final legislation depends on what happens in the Senate. The chamber’s parliamentarian has yet to determine whether immigration measures can be added under the fast-track procedure -- known as reconciliation -- that Democrats are using as a vehicle for their legislation encompassing much of President Joe Biden’s economic agenda. 

Under that process, an immigration measure must meet tests that include having a significant impact on the federal budget. 

Senate aides from both parties met with the parliamentarian last Friday to make their case for and against the proposal. The parliamentarian has not yet announced a decision. If Democrats are not able to include the proposal in the package it is unlikely that it will have support from Republicans to pass both chambers on its own.

House Judiciary Committee Chair Jerrold Nadler said the immigration provisions serve as a “vital investment” in human infrastructure.

“By providing a path to permanent residence for America’s Dreamers, temporary protected status holders, farm workers, and other essential workers who keep our country running, there is no doubt that we will benefit from the resulting economic gains for decades to come,” Nadler, a New York Democrat, said during Monday’s hearing. 

GOP lawmakers criticized Democrats during the process known as a markup for attempting to include the immigration bill as part of a reconciliation package. They also raised concerns about Democrats’ proposed $3.5 trillion price tag on the overall measure, citing figures on national debt and inflation.

“National debt approaching $30 trillion, inflation at a 40-year high, crime surging in every major urban area in this country and Democrats are going to spend $3.5 trillion and put amnesty for 8 million illegal immigrants in that bill,” said ranking Republican member Jim Jordan of Ohio.

Representative Andy Biggs, an Arizona Republican, said the bill would do nothing to curb the surge of migrants seeking asylum at the U.S. southern border, but instead provide “an additional incentive.”

“This bill rewards illegal immigration and will encourage future surges of illegal immigration while we still have an open boarder created by Democratic policies,” said Biggs during Monday’s hearing.

But Representative Alexandria Ocasio-Cortez, a New York Democrat, released a statement Monday calling the proposal a “once-in-a-generation” opportunity to establish a pathway to citizenship for individuals with a temporary protected status whose lives have been put “perpetually in limbo.”

“It is the least we can do, given our country’s direct contributions to the climate and governance disasters many of them are fleeing,” she said in the statement.

©2021 Bloomberg L.P.