House Speaker Paul D. Ryan and other Republicans on Friday urged President Trump not to rescind an Obama-era program that allowed hundreds of thousands of immigrants to stay in the country legally, reflecting fears among some GOP leaders that his decision could be politically damaging for the party.

The entreaties came as Trump neared a decision on whether to dismantle the Deferred Action for Childhood Arrivals (DACA) program, which has provided two-year work permits to nearly 800,000 immigrants known as “dreamers” who have been in the country illegally since they were children.

White House officials said Trump would make an announcement Tuesday, the deadline set by Texas and several other states to pursue a legal challenge of DACA if Trump does not terminate it. But in another sign of how politically charged the issue has become, Tennessee Attorney General Herbert H. Slatery III announced Friday that the state was withdrawing support for the case, citing the "human" costs and calling on Congress to work out a legislative solution.

Speculation has mounted among immigrant rights groups that Trump will begin to unwind the program, which President Barack Obama created in 2012 through executive action. But the late-stage opposition from some top Republicans — as well as from hundreds of major corporations such as Facebook, Google and Apple — has raised the pressure on Trump to preserve it.

Asked on a radio program whether the president should end DACA, Ryan said: “I actually don’t think he should do that.”

“I believe that this is something that Congress has to fix,” Ryan told WCLO, a station in his home town of Janesville, Wis. He said GOP leaders have been clear that Obama lacked the legislative authority to create the program.

The speaker emphasized, however, that DACA recipients “are people who are in limbo. These are kids who know no other country, who were brought here by their parents and don’t know another home. And so I really do believe that there needs to be a legislative solution.”

During a brief appearance in the Oval Office, Trump responded to shouted questions from reporters by saying he would decide the issue soon. During his campaign, Trump had repeatedly referred to DACA as an “unconstitutional executive amnesty” and had pledged to end it on his first day in office.

Instead, the Department of Homeland Security has issued an estimated 200,000 new work permits or renewals since Trump took office. The president has wavered between his desire to appear tough on immigration enforcement and his personal empathy for the dreamers, according to aides.

“We love the dreamers,” Trump told reporters Friday. “We think the dreamers are terrific.”

Trump made immigration enforcement a centerpiece of his campaign, but his equivocations over the fate of the dreamers has reflected the political predicament for Republicans. The party has struggled for years over a sharp split between immigration hard-liners and moderates who have supported legal status for some undocumented immigrants.

Polls show broad public support for the dreamers, and Democrats and immigrant rights groups have promised to wage a fierce political effort against the White House, and Republicans, if Trump chooses to end DACA.

Milton Flores, a Deferred Action for Childhood Arrivals DACA) program recipient, stands with supporters during a rally outside the Federal Building in Los Angeles on Friday. (Kyle Grillot/Reuters)

At the same time, conservative Republicans and talk show hosts have grown impatient for Trump to make good on his campaign promise. Attorney General Jeff Sessions, who was an immigration hard-liner while serving as a Republican senator from Alabama, has said publicly that the Justice Department might not be able to defend DACA in court.

Texas led a coalition of 26 states that successfully won a federal court injunction that stopped a larger deferred action program Obama announced in 2014 that would have provided work permits to undocumented immigrant parents of U.S. citizens.

The office of Senate Judiciary Chairman Charles E. Grassley (R-Iowa), who opposes DACA, said in a statement Friday that the program’s “legal future is in jeopardy.”

Trump is considering a plan that would instruct DHS to stop issuing new work permits or renewing existing ones, while those enrolled in the program would be allowed to continue until their work permits expire. That would result in more than 1,000 people per day losing their jobs through 2018, according to a recent study by the Center for American Progress, a liberal think tank, and, a high-tech group that promotes immigration.

In addition to Ryan, several other leading Republicans, including Sens. Orrin G. Hatch (Utah) and Jeff Flake (Ariz.), also lobbied the president not to kill DACA.

In a statement, Hatch said Congress must provide "a workable, permanent solution for individuals who entered the country unlawfully as children through no fault of their own and who have built their lives here." Flake, in a tweet, said lawmakers must "take immediate action to protect #DACA kids."

Florida Gov. Rick Scott (R), a longtime Trump backer, weighed in with a statement, as well: "These kids must be allowed to pursue the American Dream, and Congress must act on this immediately."

Legislative action, however, is viewed as a long shot. Three major efforts on immigration reform under Presidents George W. Bush and Obama failed on Capitol Hill, including the Dream Act in 2010 that would have offered the immigrants a path to citizenship.

A small group of congressional Republicans is pitching a “conservative Dream Act” that would reimagine the legislation in a way that could be more palatable for the GOP.

Another bipartisan proposal, called the Bridge Act, would extend DACA protections for three years to give Congress time to enact a permanent fix for the dreamers. In his letter Friday, Slatery, the Tennessee attorney general, said the Bridge Act “would be a very good start.”

Rep. Mike Coffman (R-Colo.), who represents a Denver swing district, said Thursday that if Trump ends DACA, he would use procedural maneuvers to force a vote on the Bridge Act — an encouraging sign for Democrats, who have long said that they need just a handful of Republicans to join with them to force a vote on such legislation.

Most House Republicans, however, oppose DACA and legal status for undocumented immigrants.

The uncertainty has led employers to warn of potential costs for their businesses and consumers if Trump ends the program without a legislative alternative in place.

The end of DACA would require forcing employers to police their workforce and fire those immigrants whose work permits have expired, said David Bier, an immigration policy analyst at the Cato Institute. That would impose a massive cost, estimated at $6.3 billion, because of worker turnover, Bier concluded in an analysis posted Friday using government data.

Companies would have to fire nearly 7,000 employees every week for the next two years, at a cost of $61 million a week for recruiting, hiring and training 720,000 new hires.

“That’s a really substantial hit that you’re forcing employers to incur as a result of ending DACA,” Bier said in an interview. But it would be American consumers who will pay the ultimate cost, he added, because a contracting workforce would translate into higher prices.

Tracy Jan and David Weigel contributed to this report.