WASHINGTON - The House voted Thursday to open a gateway to citizenship for young Dreamers, migrant farm workers and immigrants who've fled war or natural disasters, giving Democrats wins in the year's first votes on an issue that once again faces an uphill climb to make progress in the Senate.

On a near party-line 228-197 vote, lawmakers approved one bill offering legal status to around 2 million Dreamers, brought to the U.S. illegally as children, and hundreds of thousands of migrants admitted for humanitarian reasons from a dozen troubled countries.

They then voted 247-174 for a second measure creating similar protections for 1 million farm workers who have worked in the U.S. illegally; the government estimates they comprise half the nation's agricultural laborers.

Both bills hit a wall of opposition from Republicans insistent that any immigration legislation bolster security at the Mexican border, which waves of migrants have tried to breach in recent weeks. The party has accused congressional Democrats of ignoring that problem and President Joe Biden of fueling it by erasing former President Donald Trump's restrictive policies, even though that surge began while Trump was still in office.

While Dreamers win wide public support and migrant farm workers are a backbone of the agriculture industry, both House bills face gloomy prospects in the evenly split Senate. That chamber's 50 Democrats will need at least 10 Republican supporters to break Republican filibusters.

The outlook was even grimmer for Biden's more ambitious goal of legislation making citizenship possible for all 11 million immigrants in the U.S. illegally, easing visa restrictions, improving border security technology and spending billions in Central America to ease problems that prompt people to leave.

'They're so much of our country'

Congress has deadlocked over immigration for years, and the issue once again seemed headed toward becoming political ammunition. Republicans could use it to rally conservative voters in upcoming elections, while Democrats could add it to a stack of House-passed measures languishing in the Senate to build support for abolishing that chamber's bill-killing filibusters.

Democrats said their measures were aimed not at border security but at addressing groups of immigrants who deserve to be helped.

"They're so much of our country," House Speaker Nancy Pelosi said of Dreamers, who like many immigrants have held frontline jobs during the pandemic. "These immigrant communities strengthen, enrich and ennoble our nation, and they must be allowed to stay."

Neither House measure would directly affect those trying to cross the boundary from Mexico. But Republicans criticized them for lacking border security provisions and turned the debate into an opportunity to lambast Biden, who has ridden a wave of popularity since taking office and won passage of a massive COVID-19 relief package.

"It is a Biden border crisis, and it is spinning out of control," said House Minority Leader Kevin McCarthy.

While the number of migrants caught trying to cross the border from Mexico has been rising since April, the 100,441 people encountered last month was the highest figure since March 2019. Homeland Security Secretary Alejandro Mayorkas has said the number is tracking toward a 20-year high.

Democrats were making that problem worse, Republicans said, with bills they said entice smugglers to sneak more immigrants into the U.S. and provide amnesty to immigrants who break laws to enter and live in the country.

"We don't know who these people are, we don't know what their intentions are," Rep. Jody Hice, Republican of Georgia, said of immigrant farm workers who might seek legal status. He added, "It's frightening, it's irresponsible, it's endangering American lives."

Getting green cards

During earlier debate on the Dreamers' bill, Democrats said Republicans were going too far.

"Sometimes I stand in this chamber and I feel like I'm in the Twilight Zone, listening to a number of my Republican colleagues espouse white supremacist ideology to denigrate our Dreamers," said Rep. Mondaire Jones, a Democrat from New York.

Nine largely moderate Republicans joined all Democrats in backing the Dreamers bill.

White House press secretary Jen Psaki told reporters that Biden supports both bills as "critical milestones toward much needed relief for the millions of individuals who call the United States home."

The Dreamer bill would grant conditional legal status for 10 years to many immigrants up to age 18 who were brought into the U.S. illegally before this year. They'd have to graduate from high school or have equivalent educational credentials, not have serious criminal records and meet other conditions.

To attain legal permanent residence, often called a green card, they'd have to obtain a higher education degree, serve in the military or be employed for at least three years. Like all others with green cards, they could then apply for citizenship after five years.

The measure would also grant green cards to an estimated 400,000 immigrants with temporary protected status, which allows temporary residence to people who have fled violence or natural disasters in a dozen countries.

The other bill would let immigrant farm workers who've worked in the country illegally over the past two years — along their spouses and children — get certified agriculture worker status. That would let them remain in the U.S. for renewable 5½-year periods.

To earn green cards, they would have to pay a $1,000 fine and work for up to an additional eight years, depending on how long they've already held farm jobs.

The legislation would also cap wage increases, streamline the process for employers to get H-2A visas that let immigrants work legally on farm jobs and phase in a mandatory system for electronically verifying that agriculture workers are in the U.S. legally.