House Speaker Paul D. Ryan (R-Wis.) said on May 17 that a discharge petition to force debate on immigration bills would "guarantee that nothing goes into law." (Video: Reuters, Photo: J. Scott Applewhite/Reuters)

President Trump and House Republican leaders have reopened negotiations over the fate of young undocumented immigrants and border security, resurrecting the politically explosive issue of immigration that has stymied the GOP.

In a days-long uprising, GOP moderates fearful of continued inaction ahead of the midterm elections employed a rarely used legislative maneuver to force Speaker Paul D. Ryan (R-Wis.) and White House officials back to the negotiating table.

The overall efforts on Thursday have focused on a path to permanent residency for the hundreds of thousands of “dreamers” left in limbo after Trump canceled the Deferred Action for Childhood Arrivals program last year. Crucial to the discussions are ways to construct the U.S.-Mexico border wall that Trump promised repeatedly in the 2016 campaign.

No single issue is more politically fraught and vexing for Republicans than immigration, and the latest flash point is exposing the divisions. Trump capitalized on fears about immigrants exploiting the nation’s borders to win the presidency, and a hard-line stance is the cornerstone of his brand.

This week, the president clamored to tighten laws to keep “animal” gang members out of the country, and he has threatened to spark a government shutdown barely a month before the election if the border wall isn’t funded.

“A vote for a Democrat in November is a vote for open borders and crime,” he said at a rally last month in Michigan.

But taking a vote on restrictive immigration policies could hand political ammunition to rivals of many GOP incumbents in swing districts that are critical to retaining the party’s House majority.

Ryan, who has announced plans to retire at the end of his term, said Thursday that his goal is legislation acceptable to Trump, Republicans and some Democrats, a type of compromise that has been rare in the GOP-led House.

“The question is, could we have a bill that has a vast majority of Republicans that some Democrats would support? What’s the combination?” Ryan said

That’s a dilemma that Republicans had hoped they could avoid. In February, the Supreme Court moved to stay Trump’s cancellation of the Deferred Action for Childhood Arrivals program, which shields more than a half-million young immigrants from deportation. By removing an imminent deadline, that stalled an already precarious effort to pass a legislative DACA remedy.

But a group of renegade Republican moderates are unwilling to wait. Twenty have signed a “discharge” petition that would set up votes on competing immigration bills, including at least one that could pass with mostly Democratic votes. With nearly every Democrat expected to join the petition, that is enough Republicans to put it within arm’s reach of success.

Ryan and other Republican leaders have responded by mounting a full-court press to block the effort — which culminated Thursday in a new and frantic effort to fashion a more conservative bill that could win the support of most Republicans and potentially some Democrats.

The effort follows a White House meeting Tuesday where Trump, Ryan and House Majority Leader Kevin McCarthy (R-Calif.) discussed ideas on how to sidestep the discharge effort and also fulfill Trump’s pledges to build a border wall, crack down on “sanctuary cities” that do not cooperate with federal immigration authorities, and tighten other immigration policies.

But doing so requires navigating a political minefield, and it could mean at least a partial retreat from the sweeping immigration framework that Trump issued in January that included $25 billion in border wall funding as well as the cancellation of key legal immigration pathways.

House GOP leaders have spent months trying to build support for a conservative immigration bill co-authored by Judiciary Committee Chairman Bob Goodlatte (R-Va.) and Homeland Security Committee Chairman Michael McCaul (R-Tex.), but they have failed to persuade enough Republicans to pass it.

Conversations between House leaders and the White House in recent days have centered on how to modify the Goodlatte-McCaul bill to win broader support, according to lawmakers and Republican aides familiar with the talks. That could include adding a path to permanent residency for DACA recipients and removing a controversial guest worker program for agricultural workers that would require them to return to their home countries to secure visas.

“No one has identified that unicorn yet,” said one senior Republican aide of the effort to find a workable compromise.

By Thursday afternoon, House leaders also were trying to find a way to set up a debate next month that would allow conservatives and moderates to channel their frustrations without empowering Democrats or endangering their pending reelection campaigns.

The leaders of the discharge effort said Thursday that they were encouraged by Ryan’s efforts to broker a bona fide immigration debate but said they were prepared to move forward with the discharge petition if they are not satisfied.

“Symbolic votes are nice, but that’s not what we’re seeking here,” said Rep. Carlos Curbelo (R-Fla.), who filed the initial petition. “We want something that the president can sign, and we want to make law.”

Ryan and his leadership team are also facing pressure from their right flank, with the conservative House Freedom Caucus on Thursday threatening to withhold votes on a massive farm and nutrition bill until leaders schedule a vote on the Goodlatte-McCaul bill. McCarthy said Thursday that the House would take up that measure next month but did not indicate whether other immigration bills would get a vote.

Rep. Mark Meadows (R-N.C.), chairman of the Freedom Caucus chairman, said that “a slight amendment here or there” to Goodlatte-McCaul could produce a passable bill.

The sudden immigration fracas represented the first major legislative dust-up since Ryan announced last month that he would retire from Congress after his current term. A successful discharge petition — a rare act of internal defiance — would raise questions about Ryan’s effectiveness as a lame duck.

The last successful discharge petition came in 2015, shortly after then-Speaker John A. Boehner (R-Ohio) announced he would resign from the House. In the last few weeks of Boehner’s speakership, a majority of the House successfully forced a vote on renewing the Export-Import Bank, an agency that many conservatives want to permanently shutter.

The new dust-up also carries implications for McCarthy and House Majority Whip Steve Scalise (R-La.), the No. 2 and No. 3 GOP leaders who are both seen as potential successors to Ryan. Both men have moved aggressively to put down the discharge rebellion.

McCarthy told colleagues in a closed-door meeting Wednesday that signing the petition and potentially passing an immigration compromise favored by Democrats could depress conservative turnout in November and hurt their chances of keeping the House majority. Scalise, meanwhile, pledged to back Trump in a Fox News Channel interview: “We’re working with President Trump to get a solution,” he said, “but blanket amnesty with no border protection and no wall is not the answer.”

Immigration has been an especially sensitive issue for Ryan, who for years supported bills that would provide a path to legal status for millions of undocumented immigrants — not just those who arrived in the United States as children. But that stance has been increasingly unpopular with Republican voters, who have consistently punished those favoring “amnesty,” including former House Majority Leader Eric Cantor, who lost his Virginia primary in 2014 to a hard-liner.

Since becoming speaker, Ryan has been especially careful to respect the wishes of a conservative rank-and-file that expressed little interest in undertaking a broad effort that could give undocumented immigrants a path out of the shadows. According to the moderates leading the discharge petition, Ryan has shown no sympathy for their effort, despite his repeated pledges that Congress would act to protect DACA recipients after Trump’s election.

On Thursday, Ryan praised Trump for forging a strong immigration stance in January — one that has been criticized by Democrats and moderate Republicans for cutting back on legal immigration and funding what they consider to be an expensive and ineffective border wall.

“The president hasn’t changed his opinion, his principles, his pillars,” Ryan said. “I think the president made a very good-faith effort. . . . He was extremely reasonable in putting those pillars out there.”

Even if the House manages to muscle through an immigration bill, there is no guarantee Senate Majority Leader Mitch McConnell (R-Ky.) — whose chamber filibustered four separate immigration bills earlier this year — will take it up.

“I just don’t know how the House could pass anything that would get us the nine Democrats that we need to pass it over here,” said Sen. John Thune (R-S.D.), one of McConnell’s top deputies.

Publicly, the White House is not deviating from the framework it laid out in January, which attracted just 39 supporters in the Senate when it was voted on earlier this year.

“Our priorities have not changed in the immigration conversation at all,” White House press secretary Sarah Huckabee Sanders said Thursday.