Speaker of the House Paul Ryan, R-Wis., joined by Majority Leader Kevin McCarthy, R-Calif., left, talks to reporters following a GOP strategy session at the Capitol in Washington, Tuesday, June 26, 2018. A far-reaching Republican immigration bill is careening toward likely House rejection, a defeat that would be a telling rebuff of the leaders of a divided GOP. The party’s lawmakers are considering Plan B: Passing legislation by week’s end curbing the Trump administration’s contentious separating of migrant families. (AP Photo/J. Scott Applewhite)

Speaker of the House Paul Ryan, R-Wis., joined by Majority Leader Kevin McCarthy, R-Calif., left, talks to reporters following a GOP strategy session at the Capitol in Washington, Tuesday, June 26, 2018. A far-reaching Republican immigration bill is careening toward likely House rejection, a defeat that would be a telling rebuff of the leaders of a divided GOP. The party’s lawmakers are considering Plan B: Passing legislation by week’s end curbing the Trump administration’s contentious separating of migrant families. (AP Photo/J. Scott Applewhite)

WASHINGTON (AP) — The Republican-led House resoundingly rejected a far-ranging immigration bill Wednesday despite an eleventh-hour endorsement by President Donald Trump, as the gulf between the GOP’s moderate and conservative wings proved too deep for leaders to avert an awkward election-year display of division.

The bill was killed 301-121, with nearly half of Republicans opposing the measure. The depth of GOP opposition was an embarrassing showing for Trump and a rebuff of House leaders, who’d postponed the vote twice and proposed changes in hopes of driving up the tally for a measure that seemed doomed from the start.

ADVERTISEMENT

The roll call seemed to empower GOP conservatives on the fraught issue. Last week a harder-right package was defeated but 193 Republicans voted for it, 72 more than Wednesday’s total. In Wednesday’s vote, 112 Republicans voted “no,” including many of the party’s most conservative members.

“We need to start securing the border and not reward bad behavior, and that’s what this bill did,” said Rep. Roger Williams, R-Texas. Conservatives have opposed the bill’s provision offering a chance at citizenship for hundreds of thousands of immigrants who came to the U.S. illegally as children. Calling it amnesty, they have said it doesn’t do enough to limit the number of relatives who immigrants here legally can sponsor for residence.

Even if it passed, the bill rejected Wednesday would have been dead on arrival in the closely divided Senate, where Democrats have enough votes to kill it. House Democrats voted unanimously against it.

“Show some compassion,” said Rep. Adriano Espaillat, D-N.Y., who came to the U.S. from the Dominican Republic with his parents at age 9. “Will we step up to be the country that allowed me, as a young boy, to find safety with my mother and father?”

GOP leaders have been considering a Plan B: a bill focused narrowly on barring the government from wresting children from migrant families caught entering the country without authorization. With television and social media awash with images and wails of young children torn from parents, many Republicans have wanted to pass a narrower measure addressing those separations before Congress leaves at week’s end for its July Fourth break.

But that seemed unlikely. GOP aides said Republicans had yet to agree on bill language, and the effort was complicated by a federal judge who ordered that divided families be reunited with 30 days. Republicans have been working on legislation that would keep migrant families together by lifting a court-ordered, 20-day limit on how long families can be detained.

ADVERTISEMENT

Senators are trying craft a bipartisan plan. Trump has issued an executive order reversing his own family separation policy, but around 2,000 children remain removed from relatives and are generating damaging daily stories that Republicans would love to halt.

Besides creating a pathway to citizenship for some young immigrants, the defeated bill would provide $25 billion for Trump to build his coveted wall on the border with Mexico. It would restrict family-based immigration and bar the Homeland Security Department from taking migrant children from parents seized crossing into the country without authorization.

In a startling turnabout earlier Wednesday, Trump made an all-caps pitch for the bill. Just Friday, he’d urged Republicans to stop wasting time on the effort until after the November elections.

In his latest display of whiplash on the issue, Trump tweeted, “HOUSE REPUBLICANS SHOULD PASS THE STRONG BUT FAIR IMMIGRATION BILL, KNOWN AS GOODLATTE II, IN THEIR AFTERNOON VOTE TODAY, EVEN THOUGH THE DEMS WON’T LET IT PASS IN THE SENATE.”

The vote capped months of futile GOP efforts to pass wide-ranging legislation on an issue that could color scores of congressional races in this fall’s contest for House and perhaps Senate control. The Senate rejected three proposals in February, including one reflecting Trump’s hard-line policies and two bipartisan plans.

Democrats and centrist Republicans from swing districts say the GOP could suffer because the party, steered by Trump’s anti-immigrant harangues, could be alienating pivotal moderate voters. But conservatives relish such tough stances.

Conservative Rep. Steve King, R-Iowa, who voted “no,” said lawmakers “couldn’t go home and face their constituents and say ‘I just gave you the largest amnesty ever without really a guarantee of enforcement.’”

But Rep. Tom Cole, R-Okla., who backed the measure, said, “Some people can’t get to yes no matter what you do, and some people are just afraid of the issue.”

Rep. Carlos Curbelo, R-Fla., and Rep. Jeff Denham, R-Calif., from competitive districts with large numbers of Hispanic voters, helped force Ryan to stage immigration votes.

This spring they launched a petition that could have led to House passage of liberal-leaning measures creating a pathway to citizenship, bills backed by Democrats but opposed by most Republicans. Leaders headed off the petition by urging GOP lawmakers to not sign it, partly by crafting the compromise package the House rejected Wednesday.

After the vote, Curbelo said too many lawmakers “simply lacked the courage” to help “victims of a broken immigration system.” Denham said the vote made it “very obvious that we need to have a bipartisan solution” — an avenue that the approach of campaign season makes highly unlikely.

The more conservative bill the House rejected last week clamped down on legal immigration and provided no way for the young immigrants to become citizens.

___

AP reporters Catherine Lucey, Kevin Freking and Matthew Daly contributed.