The U.S. House of Representatives has passed a bill that would give undocumented immigrants, including “Dreamers”, a pathway to citizenship.

The House on Thursday voted 228 to 197, largely along party lines, to set up a legal pathway to citizenship for Dreamers – people who came to the US as undocumented minors and who received temporary protections under the Deferred Action for Childhood Arrivals (Daca) program.

The bill, called the American Dream and Promise Act of 2021, would also grant green cards for many immigrants who have fled war or natural disasters and are residing in the U.S. with a temporary protected status. In all, it could make 4.4 million people eligible for permanent residence in the US, according to the Migration Policy Institute.

Nine Republicans joined Democrats in support of the measure.

Representatives also voted 247-174 Thursday on a second bill, which would grant legal status for undocumented farmworkers. Both measures passed in 2019, as well, with some Republican support – but the measures are likely to join a growing list of legislation that will hit a wall in the evenly divided Senate, where Republicans have vowed to block proposals with the filibuster.

The measures are among several attempts by Democrats to reverse Donald Trump’s hardline immigration policies. They also coincide with Joe Biden’s efforts to address the number of migrants arriving at the US-Mexico border, many of whom are fleeing dangerous conditions in Central America.

The Dreamer bill would grant conditional legal status for 10 years to many undocumented immigrants who were brought into the US as children.

During Thursday’s debate, the Democratic representative Pramila Jayapal noted she had come from India to the US alone at the age of 16, saying: “Let’s stop the hypocrisy of criminalizing immigrants.”

Immigrant rights groups celebrated the news of its passage. “This is a result of years of organizing and pressure from the immigrant rights movement, but we’ll continue to hold our celebration until the very end,” tweeted the advocacy group Raices.

As president, Trump rescinded the Obama-era Daca program, which offered temporary protection from deportation to Dreamers. However, the Supreme Court ruled in 2020 that Trump’s move had been unlawful.

The Biden White House backed both bills. But it also urged lawmakers to adopt broader reforms in Biden’s sweeping immigration bill introduced last month, saying this would secure the border and “address the root causes of instability and unsafe conditions causing migration from Central America”.

“We can’t keep waiting,” Biden wrote on Twitter. “I urge Congress to come together to find long term solutions to our entire immigration system so we can create a safe, orderly, and humane immigration system, tackle the root causes of migration and legalize the undocumented population in the United States.”