The year 2018 was huge for Democrats: They won a majority in the House of Representatives for the first time in a decade, retook governors’ mansions in eight states and flipped hundreds of seats in state legislatures across the country.

Yet despite the successes, Democrats left some potential victories on the table. We are going to look at three of these cases: Stacey Abrams, the former minority leader of the Georgia House of Representatives who ran for governor in Georgia; Andrew Gillum, the former mayor of Tallahassee who ran for governor in Florida; and Beto O’Rourke, a former member of Congress from El Paso who ran for the Senate in Texas.

All three were viewed as rising stars. Yet all lost.

Democrats’ Loss in Key States due to Underperformance of African–Americans and Latinos

In many ways, Gillum’s loss in Florida’s gubernatorial race to Republican Ron DeSantis was the most distressing. Florida is a state that Barack Obama won twice, and it is a state that Democratic presidential candidates need to carry—badly.

Abrams’ loss in Georgia and O’Rourke’s loss in Texas fall closer to the “moral victory” category. It has been several decades since a Democrat won a statewide race in either state. The fact that both candidates were able to run competitive races should give Democrats hope that they can compete and win in 2020 and beyond.

But narrow losses are still losses. Neither Abrams, Gillum or O’Rourke hold elected offices. Why did these candidacies fail? What lessons can Democrats draw from them?

Democrats have Advantage in Florida, Georgia and Texas because of Minority Populations

Florida, Georgia and Texas all share a couple of common traits. They are in the Sun Belt and they all have substantial minority populations. Florida has large Black (17%) and Latino (25%) populations, as does Texas (12% and 39%, respectively). Georgia has a large Black population (31%).

However, minority groups do not make up a majority of voters in any of these states. If a Democrat wants to win statewide, the candidate needs to build a multiracial coalition. This is how Obama won Florida in 2008 and 2012. How successful were these candidates in appealing to different groups in 2018?

Gillum narrowly lost in Florida—he ended up with just over 30,000 fewer votes out of more than 9 million cast. When we look at the exit polls, we can see that Gillum won 39 percent of the White vote, 54 percent of the Latino vote and 86 percent of the Black vote.

Compare these splits to Obama’s 2012 performance in Florida. He won 37 percent of the White vote, so slightly less than Gillum. But Obama won 60 percent among Latinos and 95 percent among African-Americans.

Gillum was not able to hit the benchmarks Obama set six years earlier (or even Hillary Clinton), and this is the reason why he is not the governor today. He actually underperformed former Democratic Sen. Bill Nelson (who was running for reelection and also lost) among both Whites and Blacks. Also troubling was that turnout was down among non-Cuban Latinos, who are heavily Democratic voters (Cuban Americans, on the other hand, lean Republican).

These facts suggest that the Gillum campaign underperformed among both Latinos and African-Americans—two core Democratic constituencies. His campaign was supposed to be based on registering new voters and mobilizing them, but these efforts fell short. Bottom line, this was a race the Democrats could have won but did not.

Abrams and O’Rourke faced longer odds than Gillum, and arguably outperformed him.

Abrams won 93 percent of the Black vote and 62 percent of the Latino vote. The problem is that Whites in Georgia are very, very Republican.

Related Headlines

Abrams won only 25 percent of the White vote. This number is an improvement from Clinton’s dismal 21 percent showing in 2016. Abrams’ problem was not mobilization either—she was able to turn out her core supporters. Abrams won more votes in 2018 (over 1.92 million) than Clinton did in 2016 (1.87 million), which is an unheard level of turnout for a midterm election.

Abrams lost because Republican turnout was high, too. With this level of racially based polarization, there simply were not enough Black and Latino votes to offset high levels of White turnout.

Democrats require a Multi-Cultural Turnout to Win in Georgia

For the Democrats to win in Georgia, they will need high turnout from African-Americans and Latinos, and win roughly 30 percent of the White vote. This is a tough task and winning Georgia will be an uphill battle for whomever the Democratic nominee is in 2020. As Abrams found out, there is little margin for error.

O’Rourke’s performance in Texas might be the most difficult to evaluate. The demographics of Texas are changing. The Latino population is growing rapidly. There are also a lot of people moving to Texas from more liberal states such as California, Illinois and New York. Texas’ politics are changing as a result.

O’Rourke ultimately lost to Republican Ted Cruz but had the best statewide showing of any Texas Democrat in several decades. He won 89 percent of the African-American vote and 64 percent of Latinos. He also won 34 percent of the White vote, which is a big improvement from Clinton’s showing two years prior. O’Rourke won about 250,000 more votes than Clinton.

Yet this was not enough to unseat Cruz, who won with 50.9 percent of the vote. O’Rourke’s presence certainly helped Democrats down the ballot, but if the Democrats are going to win statewide they will need an even better performance.

Democrats need large turnout of African–Americans and Latino Voters to Win in Texas

There are some reasons to think the Democrats might be able to pull off a win in 2020. Two years is a lot of time given how fast Texas’ demographic makeup is changing. Latinos should make up a larger share of the state’s electorate in 2020. This will help a Democratic candidate, especially if he or she can motivate high turnout. Also, President Donald Trump is so unpopular that the Democrats might improve their share of the White vote, especially among recent transplants from the Northeast and West Coast.

It would probably take both for a Democrat to carry Texas in 2020, but the opening gets bigger every election cycle.

We will likely see all three of these Democrats return to the national stage in the near future. The Democrats are desperate to find the next generation of leaders, and Abrams, Gillum and O’Rourke all fit this bill despite their losses.

Though these losses were all disappointing, they offer some important lessons for Democrats. The first is that Democrats can win in the Sun Belt and should make an aggressive push in 2020. As demographics change, Democrats can form coalitions of White liberals, African-Americans and Latinos, and compete in states that were previously written off as easy Republican wins.

Even if the Democrats fail to carry these states, the 2018 midterm showed that having a strong candidate at the top of the ticket can help drive up Democratic turnout and this benefits other ballot candidates. The Democrats won a large number of Congressional, state and local races in Texas and Georgia. Beto and Abrams deserve some of the credit for these wins.

The second is that they should not take their core supporters for granted. Gillum had a weak showing among African-Americans and Latinos, which cost him. Republicans in Florida made an aggressive effort to reach out to the Latino community and managed to win enough of their votes to defeat Gillum and Nelson. The Democrats cannot afford to make the same mistake next time.

In 2020, Democrats should compete in every state they can possibly win. We knew Florida was going to be on the list. The midterms showed that Georgia and Texas should be, too.

Josh Zingher is an assistant professor of political science at Old Dominion University in Norfolk, Virginia. You can follow him on Twitter @JoshuaZingher.