After the 2012 presidential election, Republicans came to a conclusion: They needed to make inroads with Hispanic voters. Four years later, the party chose Donald Trump—whose controversial rhetoric and hardline stance on immigration alienated many Hispanic voters—as its nominee, intensifying tensions between the GOP and Hispanics. Despite that history, Republican strategists now see an opportunity to appeal to this segment of the population by passing legislation granting legal status to recipients of the Obama-era Deferred Action for Childhood Arrivals program, which shields undocumented immigrants brought to the U.S. as children from deportation.

Last month, the Trump administration announced that it was ending DACA with a six-month delay. That leaves the Republican-controlled Congress with time to act to protect DACA recipients, known as “Dreamers,” if it so chooses. DACA is a particularly salient issue within the Hispanic community, as many of the program’s nearly 700,000 beneficiaries are originally from Central America. The program’s beneficiaries are also overwhelmingly from mixed-status families, meaning some members may be legally residing in the U.S. while others may be undocumented. A legislative fix under a Republican administration, therefore, might help advance GOP efforts to appeal to Hispanic voters.

“I tell everybody that Trump might be, ironically, the president that saves the GOP when it comes to the Hispanic community because if he passes this DACA legislation, it’s going to be a total 180 as to what he stood for during his campaign,” said Artemio Muniz, the chairman of the Federation of Hispanic Republicans. “He’s going to save the GOP because the GOP itself has not been able to do anything, and we could make the argument to Hispanic communities that it was Donald Trump that actually forced legislation, and the Democratic Party had eight years to do something and never did.”

The decline in Republican support from Hispanics happened over the course of several elections: In 2004, George W. Bush garnered 44 percent of the Hispanic vote compared to John McCain’s 31 percent in 2008 and Mitt Romney’s 27 percent in 2012. Then came Donald Trump. Despite his 2016 win, and slightly better showing among Hispanic voters compared to Romney, Latino Republicans see an opportunity in DACA to correct the course among this segment of the population.

“Over the last number of years, the trajectory has not been great for Republicans with Hispanic voters, include Donald Trump, exclude Donald Trump, the trajectory hasn’t been great. We know that this is a growing piece of the pie here,” a Republican strategist told me, adding that the administration’s success in other areas, like the passage of DACA legislation, could serve as a boost. “This president was dealt this hand after eight years of a predecessor who was unable to pass a law and here we are. There’s risk and there’s opportunity.”

The urgency to coalesce Hispanic voters behind the Republican Party stems from an ongoing shift in voter demographics. Over the years, there’s been a considerable uptick in the number of Hispanic eligible voters, from 23.3 million in 2012 to 27.3 million in 2016, according to the Pew Research Center. Of course, there are several factions within the Hispanic community, some of which have long supported the GOP, but Hispanic voters have often leaned Democratic. While their electoral impact has been hindered by low voter turnout, there’s reason to wonder about their influence down the road. For example, a data analysis on 2016 voting, conducted for The Atlantic by Robert Griffin and Ruy Teixeira of the Center for American Progress’s States of Change project, found that the Republican base, made up in part by non-college-educated whites, is shrinking.

The GOP acknowledged a shift in its post-2012 autopsy report. “We are not a policy committee, but among the steps Republicans take in the Hispanic community and beyond, we must embrace and champion comprehensive immigration reform,” it read. “If we do not, our Party’s appeal will continue to shrink to its core constituencies only.”

Glenn McCall, an RNC committeeman from South Carolina and one of the authors of the report, is confident that Hispanic voters will back the party in upcoming races. “I think it’s going to grow next election cycle, as we look at some state and congressional races, I see that number growing with Hispanics,” he said, adding, “I think it’s going to take some time and we’re going to be persistent about it.”

Muniz, along with other Hispanic Republican leaders, will meet with GOP lawmakers on Wednesday to lobby them to pass legislation codifying DACA protections. “If we don’t codify it, we’ll be in serious danger as a party,” he said.

The push to pass a measure comes against the backdrop of the crisis in the U.S. territory of Puerto Rico in the aftermath of Hurricane Maria, which has left residents without power and basic necessities. In recent years, Puerto Ricans have been migrating to the mainland, as a result of the island’s economic recession. Although as a territory, Puerto Rico has no electoral votes or representation in Congress, Puerto Ricans are U.S. citizens by birth and can vote in any state they move to. Puerto Ricans are now among the largest hispanic groups by origin in the U.S., with a population of nearly 5.4 million. Some Latino Republicans are concerned that the president’s response could hinder the effort to reach out to Latino voters at a crucial moment.

Over the weekend, Trump slammed San Juan Mayor Carmen Yulín Cruz and other officials who have publicly criticized the administration’s recovery efforts.  “Such poor leadership ability by the Mayor of San Juan, and others in Puerto Rico, who are not able to get their workers to help,” Trump said on Twitter. “They want everything to be done for them when it should be a community effort.” The spat fueled frustrations among some lawmakers. Florida Senator Marco Rubio, a Republican, said on CBS’s Face the Nation: “Every minute we spend in the political realm bickering with one another over who’s doing what, or who’s wrong, or who didn’t do right is a minute of energy and time that we’re not spending trying to get the response right.”

Rubio’s response falls in line with that of other Republican leaders in the state of Florida, which has one of the largest populations of Puerto Ricans in the country. New York had the largest population of Puerto Ricans on the mainland until 2014, when the population in Florida grew to match that of the Empire State. In fact, a Pew Research Center analysis of Census Bureau data found that the number of Puerto Ricans in Florida increased 110 percent since 2000. Alienating Puerto Rican voters could therefore be particularly perilous for Republicans in Florida, a battleground state.

Trump won Florida in the 2016 presidential election, but had a dismal showing among Hispanics. The then-Republican nominee garnered 35 percent of the Hispanic vote in the state, compared to Hillary Clinton’s 62 percent. Daniel Smith, a political science professor at the University of Florida who surveyed self-identifying Puerto Rican-born voters in the state after the presidential election, found that Trump garnered roughly 25 percent support in some areas where there were at least 100 Puerto Rican voters.

The Republican Party’s poor showing among Hispanics, however, is not solely credited to Trump, he said. “Is it Donald Trump that was the nail on the coffin? Perhaps. But Republican leaders were already hammering into that coffin,” Smith said.

Republican strategists argue the episode between Trump and Cruz is unlikely to make a big dent in Hispanic outreach efforts, pointing instead to potential victories in the future.

“Everything can be undone,” said Jacob Monty, a former member of the Hispanic Advisory Council for Trump. “[Trump is] already so low among Latinos, so he has nowhere else to go but up. If he can solve some big issues that are affecting Latinos, like DACA, North Korea, tax reform, he can only go up. To date, he hasn’t solved those yet.”

Freddy Balsera, a Miami-based political consultant who served as President Obama’s Hispanic media manager during his 2008 presidential campaign, said that Trump’s response to Puerto Rico will not be taken lightly within the community. “Taking a good position on DACA helps, but ultimately they have Trump and that could be what really dooms their fate with voters who might not be able see beyond that,” he said, adding, “You don’t have to be Puerto Rican to take offense to the attitude and lack of leadership.”

Banking on the passage of DACA legislation is still a risky bet. Measures to protect young undocumented immigrants have been introduced in Congress in the past to no avail. Some Democrats are pushing for a clean bill, while Republicans want border security included in the deal. During a Senate Judiciary Committee hearing on DACA Tuesday, Senator Chuck Grassley said that “any potential DACA agreement has to include robust border security and by that, I don’t mean a wall.”

It’s not clear how effective DACA legislation would be in convincing Hispanic voters to back the GOP. “There are so many other issues affecting Hispanics in this country,” Smith told me. “Certainly, DACA is a very important one to a very large segment of that community. Is it suddenly going to lift the shroud from the Republican Party? I’m not sure.” During the 2016 election, immigration was ranked below education, the economy, and health care as important issues for Hispanic voters.

But should Congress pass immigration legislation under the Trump administration it would  be, as one strategist put it: “the ultimate irony.” And one that many Republicans hope will help the party’s standing in the Hispanic community.