MIAMI — Miami-Dade County has long been a crucial region for Democrats' hopes of winning races in Florida. But today, the county's Democratic lean is becoming stronger than ever.

Both Al Gore and John Kerry won Miami-Dade by about 40,000 votes. Then, in 2008, Barack Obama won Miami-Dade by 139,000 votes.

Four years later — and contrary to the decline in his vote share elsewhere — Obama won Miami-Dade by 208,000 votes. Finally, in 2016, Hillary Clinton defeated Donald Trump in Miami-Dade by a whopping 290,000 votes.

The trend line is clear: In Miami-Dade, an ethnically diverse metropolitan area where staunchly Republican Cuban-Americans have traditionally played a leading role in politics, the Democrats are gaining ground.

We visited Miami and its environs recently to find out why.

Currently, Democrats account for about 42 percent of registered voters in Miami-Dade, followed by 31 percent without a party affiliation and 27 percent registering as Republicans.

Dan Gelber, newly sworn in mayor of Miami Beach.

"I think there's a huge, simmering energy among Democrats right now, and many moderate Republicans are concerned about Trump and the direction of the country," said Dan Gelber, the newly elected Democratic mayor of Miami Beach. "It's very hard to know how long the intensity will last. How strong it is will determine whether it's a wave or a ripple."

While Democrats in Miami-Dade certainly have some things to worry about — notably a party base heading leftward, possibly too far to win general elections — political strategists and other experts here suggested several reasons for Democratic optimism. And that doesn't even include the accelerating influx of Puerto Ricans, which is having a less of an impact in Miami-Dade than elsewhere in Florida.

1. Growing numbers of non-Cuban Latino voters.

"Go to Doral, north of the airport," said Dario Moreno, a longtime political scientist at Florida International University who consults for candidates, mostly Republican but occasionally Democratic. "There you have a Republican Cuban mayor, but the voters are split one-third Republican, one-third Democratic and one-third no party affiliation."

Many Venezuelans and Colombians have settled in Doral, and their partisan leanings are considered up for grabs.

Nelson Diaz, chair of Miami Dade GOP.

"It's hard to say whether they go one way or another yet," said Nelson Diaz, a lobbyist and consultant who is in his third term chairing the Miami-Dade GOP. "We're doing big outreach" to those communities, he said.

It's worth noting, however, that non-Cuban Latino voters have been significantly more likely to vote in presidential election years than in off-year elections, so their political influence is still a work in progress.

2. Generational change among Cuban-American voters.

While Cuban-Americans of the exile generation tend to vote 70 percent to 75 percent Republican, younger Cubans are more like a 50-50 proposition.

"I used to say (Cuban generational change) was a myth, but it's not," said David Custin, a lobbyist and consultant who represents Republicans in the Legislature but who has occasionally represented Democrats, such as former Miami Beach Mayor Philip Levine, now a gubernatorial candidate.

"If you're 40 or over, you've pretty much accepted your parents' exile experience and you're really hard-line on Cuba," Custin said. "But it's a mixed bag for the millennials."

Intermarriage has played a role. "They'll take on a 'Miami Latino' identity," Moreno said. "I see that a lot with my students — they'll consider themselves 'Cuban-Venezuelan.' "

In general, Diaz said, younger Americans of Cuban ancestry are "more invested in American issues than specifically Cuban issues." If anything, their politics has been shaped by the socially liberal views of their non-Cuban generational peers.

"On gay marriage and social issues, they are much more liberal than those who are over 40," Custin said.

3. A decline in Cuban-American turnout.

Going hand in hand with the generational shift in ideology is the aging of the hard-line Republican portion of the Cuban-American electorate.

Cuban voter turnout in Miami-Dade "used to be higher than Anglo or Jewish turnout, but that's deflating as voters get older," Moreno said. While this pattern isn't as dramatic as the ideological shift between the generations, "it's enough to make a difference," Moreno said.

Energizing older Cuban-Americans to vote can be tricky. A good way to get these voters to the polls is by phone banking, which isn't sexy or lucrative for political consultants. In addition, "you can't have a Colombian calling a Cuban" if you want to reach these voters, Moreno said.

4. The rise of immigration policy as a major political issue.

Historically, two of the major Latino populations in Florida haven't taken as strong an interest in the overall immigration debate as Mexicans and Central Americans have. That's because many Cuban immigrants have been able to take advantage of special policies designed for those fleeing the Castro regime, while Puerto Ricans are already American citizens and don't have to worry about obtaining legal residency.

Now, though, growing numbers of younger Latinos are feeling empathy for "Dreamers"— those brought to the country illegally when they were children.

"Younger Cuban-Americans have been caught up in the social movements of the time, and one of the most successful ones on campus involves the Dreamers," Moreno said.

Separately, Haitians — many of whom live in and around Miami — are angry that their temporary protected status is not being renewed by the Trump administration, adding one more ethnic group in the Miami-Dade area that is unhappy with the White House on immigration.

Ultimately, voters who are worried about Republican efforts to tighten immigration policy are susceptible to Democratic appeals.

5. Growing concerns about climate change.

With many parts of the Miami area under direct threat from rising sea levels, concerns about climate change are particularly acute locally.

Several prominent local Republicans — Miami-Dade County Mayor Carlos Gimenez, as well as U.S. Reps. Carlos Curbelo and Ileana Ros-Lehtinen — have taken high-profile roles urging efforts to curb climate change. (In addition to portions of Miami-Dade, Curbelo also represents the Florida Keys, which are at high risk from rising sea levels.)

Despite such support from Republican elected officials, it's easier for Democrats to make a climate-based pitch to voters, because their national party is more unified in favor of climate action than the GOP is.

"Sea-level rise has become a mobilizing factor for a lot of voters," said Sean Foreman, a political scientist at Barry University in Miami Shores.

6. More voters are choosing to register without a party affiliation.

In 2008, voters who chose "no party affiliation" when registering to vote accounted for 20 percent of Miami-Dade voters. Today, the share with no party affiliation is 31 percent; Republicans have taken a somewhat bigger hit in party registration share than Democrats did between 2008 and 2017.

Of course, even voters who register without a party affiliation may lean toward one party or the other in most elections. Still, the lack of a tangible party connection means that these voters are somewhat more up for grabs than partisans are, and with today's issue environment favoring Democrats, that could help the party.

"Consistently, no-party affiliation voters are outpacing both parties in registration," Custin said. "It's not insurmountable for Republicans with proper messaging and organization, but these voters in Miami-Dade are in many cases less conservative than in the past."

Experts say they believe that non-party-affiliated voters may have been decisive in a key state Senate special election in September in which Democrat Annette Taddeo defeated Republican Jose Felix Diaz.