DORAL, Fla. — House Republicans sought to use their annual policy retreat near Miami this week to articulate a legislative agenda that could broadly appeal to voters ahead of midterm elections the lawmakers are at risk of losing, and to present an optimistic front as they fight to keep control of Congress.

But in the middle of the gathering, Speaker Mike Johnson, a vocal booster of his fractious conference and one who is often publicly sunny about its electoral prospects, acknowledged a vulnerability: President Donald Trump’s immigration crackdown has alienated voters, and his party is now in need of a reboot on the issue.

“We’ve got a little hiccup with some of the Hispanic and Latino voters for certain, because some of the immigration enforcement was viewed to be overzealous,” Johnson said in an interview onstage.

“And, you know, everybody can describe it differently. But here’s the good news: We’re in a course correction mode right now,” Johnson continued. “We’re going to have a new secretary of homeland security.”

Johnson’s comments were a strikingly candid admission that his party was, at least for now, trying to shift focus away from hard-line immigration enforcement, a signature issue that Republicans widely credit for helping them win control of the White House and both chambers of Congress in 2024.

It came hours after top Republican officials advised lawmakers in a private meeting to stay away from discussing “mass deportations” as they campaigned for reelection, according to two people who were present and were granted anonymity to describe the session.

James Blair, who was Trump’s political director in 2024 and is now a deputy chief of staff in the White House, suggested that the lawmakers focus instead on the administration’s efforts to deport immigrants accused of violent crimes. His remarks, which drew vitriol from many on the right who said Republicans should unapologetically champion Trump’s mass deportation campaign, were reported earlier by Axios.

The discussions reflected the anxiety that some Republican lawmakers harbor about their prospects in November’s elections and their fear that the Trump administration’s aggressive deportation drive may cost them support with voters, particularly after federal immigration officials shot and killed two American citizens in Minneapolis earlier this year.

Johnson, in particular, made public a private concern voiced by lawmakers that the administration’s tactics have alienated Hispanic voters who shifted toward Trump in 2024, potentially sending them back into the arms of Democrats or prompting them to skip voting in battleground districts where Republicans need their support to hold their majority.

Recent polls have done little to calm Republicans’ unease. Although immigration has been a signature issue for the GOP in the Trump era, recent surveys have shown the party’s advantage with voters to be shrinking. A poll conducted in January by The New York Times and Siena University found that 63% of voters disapproved of Immigration and Customs Enforcement’s tactics, with a small share of Republicans agreeing that the agency had “gone too far.”

Rep. Lisa McClain of Michigan, who oversees messaging for House Republicans, dismissed the idea that lawmakers had been urged to change their language, even as she seemed to concede that the party needed to fine-tune its strategy.

“We have to focus our message, because it matters,” McClain said on Wednesday. “We need to keep our communities safer, deport the violent criminals. That’s what we need to focus on, because that’s a winning message. I don’t know if it’s a shift.”

There were signs elsewhere. Throughout the conference, Republicans continued to hammer Democrats for blocking a spending bill to reopen the Department of Homeland Security. But they focused their criticisms not on immigration enforcement but on counterterrorism efforts and delays at the Transportation Security Administration’s airport checkpoints.

Even Trump, whose hard-line and nativist rhetoric on immigration has been a central feature of his political rise, steered clear of some of his harshest language. Last year, when he addressed House Republicans at their retreat, Trump spoke at length about mass deportations and immigration enforcement.

This year, he spoke only in passing on the topic, calling briefly for limits on Democrat-led jurisdictions that limit cooperation with immigration agents and for a law preventing immigrants without legal status from getting commercial driver’s licenses.

Trump scarcely mentioned deportations and border security as he rallied his party, making his central policy demand a hybrid law focused on new restrictions on voting and unrelated restrictions on transgender Americans, two red-meat issues for his Republican base.