TAMPA — Florida Gov. Rick Scott steals time every day as he campaigns for the Senate to practice a skill his old friend President Trump once dismissed as a bad Republican habit — speaking in Spanish.

“Mi práctica en español todos los días es muy importante para mi,” he said proudly in early August, as he took a few minutes to talk in the backroom of Casa Cuba, a club for anti-Castro expatriates, where he had just delivered a bilingual statement on Latin American policy.

Back in 2015, Trump frowned upon this sort of politicking, telling voters that “this is a country where we speak English, not Spanish.” Since then, the president has transformed Republican politics on immigration, recasting those without papers as an existential threat bringing terrorism and crime, seeking reductions in the legal immigration flow and warning that the foreign-born are “changing the culture” for the worse.

But Trump has not objected this year as Republicans like Scott in tight races with large Latino voting blocks carefully try to distance themselves from his nativist rhetoric and polarizing tactics. Unlike Trump’s 2016 electoral college map, which depended heavily on working-class whites in the Midwest, the midterm elections will run through many parts of the country where Hispanics make up double-digit shares of the voting electorate.

As Trump continues to hammer the threat of criminal undocumented immigrants, calling them “animals” who seek to “infest” the country, with support from some in Congress, Republicans are playing to win these more diverse parts of the country as well.

“In three of the most competitive U.S. Senate races in the country, the only way the Democrat wins is with the Latino vote,” said Cristóbal Alex, the president of Latino Victory Project, a liberal group supporting Democratic candidates. “The other side understands this and is spending millions of dollars to confuse Latino voters and to run away from Donald Trump.”

In addition to Senate races in Florida, Arizona and Nevada, 10 Republican House seats at risk in November fall in districts where more than 1 in 5 eligible voters are Latino, according to the Pew Hispanic Center. Like Scott, Republican candidates in those districts have charted their own course, often with the help of the national Republican Party and supportive outside groups.

The result has been a remarkable bifurcation between the continued rhetoric of the Trump administration and local messaging of some Republican campaigns. It has also lead to confusion about the policy focus of the party. At a recent rally in Tampa, for instance, Trump told the crowd that “we have to make sure that Rick Scott wins,” even though Scott says he supports a stand-alone bill opposed by the president to give a path to legal status for undocumented immigrants brought to the country as minors.

The printed materials in Spanish for the Orange County GOP in Orlando tell voters that “immigration reform”—“reforma migratoria” — is a core “value of the Republican Party,” terminology often used to describe giving some legal status for undocumented immigrants and a generous flow of legal migrants in the future. At the same time, Attorney General Jeff Sessions has warned that the country is approaching “the largest percentage of nonnative born population in our nation’s history.”

Republicans who have opposed Trump’s nativist shift remain concerned about the general drift of the party.

“It’s encouraging that candidates and elected officials that are running for reelection don’t disrespect large swaths of their population to win an election,” said Jeb Bush, a former Florida governor who is supporting Scott and Rep. Carlos Curbelo (R-Fla.) in the midterms. “But not long ago that would have been a given.”

In Florida, the efforts have had an impact, especially among the Puerto Rican community that felt neglected by the Trump administration after Hurricane Maria hit the island in 2017, knocking out power and killing many. A June survey by Florida International University found that more than 7 in 10 Puerto Ricans in Florida had a negative view of Trump, but 55 percent of the same group had a positive view of Scott, who had a higher approval rating than his opponent, Sen. Bill Nelson (D-Fla.).

A more recent head-to-head poll by several Democratic-leaning groups found Scott and Nelson locked in a statistical tie, with 46 percent approval for Scott among Florida Latinos, compared with 34 percent approval for Nelson. Notably, Scott was leading among Puerto Rican men and those without a college degree.

“They think that Trump was disrespectful of them,” said Eduardo Gamarra, a political-science professor who conducted the poll of the Puerto Rican community in Florida. “Scott, despite his close relationship with the president, is a man who has gone to Puerto Rico seven times. He could appear as somebody who is responding directly to their needs.”

Scott has also benefited from extensive outreach efforts by Republicans in Florida, including workshops for newly arriving Puerto Ricans, who are U.S. citizens and can register to vote in Florida after the move, about how to navigate the basics of living in the state. Similar efforts are being made among Latinos in Nevada.

Organizers on the ground admit that the political environment sometimes makes persuading Latinos difficult.

“It was very emotional,” said Gary Berrios, the party’s director of Puerto Rican engagement in Florida, when asked about the Trump administration’s former “zero tolerance” policy that led to the separation of thousands of parents and children at the U.S.-Mexico border this summer. But he said his team often tries to direct the discussion away from immigration policies.

“For Puerto Ricans, the important issues are a job, education and housing their families,” he said.

The U.S. Chamber of Commerce, which typically backs Republican candidates, has spent hundreds of thousands of dollars on ads to praise Republicans in two districts where more than 50 percent of eligible voters are Latino: Rep. Will Hurd (Tex.) and Curbelo. Both spots praised the lawmakers for supporting the stand-alone bill to provide a path to legal status for younger undocumented immigrants.

The Congressional Leadership Fund, the main outside group supporting GOP House campaigns, has tailored its own messaging for different parts of the country. In a recent special election in Pennsylvania, the group attacked Rep. Conor Lamb (D) for wanting to “give amnesty to illegals.” Meanwhile, a partner organization, the American Action Network, has funded Spanish language outreach efforts for Hurd, Curbelo and Rep. David Valadao (R-Calif.).

The congressmen were each vocal opponents of the child separation policy. (Scott has called the episode “horrible,” without directly criticizing Trump.)

“This is a tough environment for Republicans,” said Corry Bliss, the executive director of the Congressional Leadership Fund. “The difference between those who get reelected and those who don’t are those who give their constituents a reason to vote for them.”

In other competitive open House seats, the party has successfully recruited Latino leaders to run for office. In Arizona, Lea Márquez-Peterson, who heads the area Hispanic Chamber of Commerce, is favored to win the GOP’s nomination this month in a Tucson seat where 22 percent of voters are Latino.

“I don’t use illegal as a noun,” she said of her approach to immigration, which includes support for a new wall in some parts of the border and an eventual path to legal status for those in the country without authorization.

Some Democrats have begun to sound alarms about the Republican efforts, as polls suggest Latino voters may not turn out in the numbers or with the margins that Democrats had hoped.

Many strategists think the problem will be solved by simply tying Republicans to Trump in campaign ads this fall, much like Rep. Jacky Rosen, the Democratic candidate, has been doing in the Senate race in Nevada by running a new Spanish-language ad that casts Sen. Dean Heller (R-Nev.) and Trump as “compas,” or buddies.

But focus groups and polling by the Senate Majority PAC, the largest ad buyer for Democratic Senate campaigns, have found that while Trump is widely disliked among Latinos, anti-Trump messaging is not always the best way to get them to the polls. Kitchen table issues like jobs, health care and education continue to resonate for a community that often sees itself as detached from the national political debate.

“It’s not all as cut and dry as liberals think it is, especially D.C. liberals,” said J.B. Poersch, president of the group.

A recent national poll for several Democratic-leaning groups found 36 percent of Latinos said fighting back against racism was the most important reason to vote. But the same survey found only 53 percent of Latino voters said they were certain they would cast a ballot in November.

“You want a commitment much higher at this point,” said Matt Barreto of Latino Decisions, which conducted the poll. “The Democratic candidates have this huge opportunity, but they actually have to make the connection in the community.”

Making the connection is what Scott has been trying to do in Florida.

While Nelson has yet to spend on television ads, Scott has been blanketing Spanish-language broadcasters with spots boasting of his attention to the Latino community and documenting heavily-accented attempts at speaking Spanish.

He has started saying he will represent both Florida and the commonwealth of Puerto Rico if elected to the Senate, and has highlighted the efforts his administration undertook after the 2017 hurricane to make it easier for Puerto Ricans to relocate to Florida.

In an interview, Scott said he doesn’t spend time thinking about distinguishing himself from Trump, a longtime ally he supported in 2016 by chairing a $22.6 million pro-Trump super PAC. But his actions suggest a careful calculation by his campaign.

Scott introduced Trump at an Orlando rally in December 2016, where the president-elect congratulated his supporters for being “nasty and mean and vicious.” But when Trump held a similar rally in Tampa in July, Scott did not attend.

“We are a state of immigration,” he said back at Casa Cuba, after slipping back into English. “Just go around, look around at all the languages spoken here.”

Asked whether Republicans should be a party that welcomes immigrants, Scott answered quickly: “Yeah, I like people. I want people to move here.”