Two weeks before this year’s midterm elections, in front of a crowded auditorium at Broward College, Florida gubernatorial candidate Andrew Gillum called out his Republican opponent, Ron DeSantis, for taking donations from and speaking at conferences hosted by white supremacists. “I’m not calling Mr. DeSantis a racist. I’m simply saying the racists believe he’s a racist,” said Gillum.

Gillum was right. DeSantis ran on racism — and so did many other Republicans. And racism appears to have won, at least in Florida and Georgia, where Democrats had hoped the historic campaigns of black candidates Andrew Gillum and Stacey Abrams would be decisive in winning control of these pivotal states.

To be clear, Republicans did not do well in the 2018 elections. They lost nearly 40 House seats, lost control of at least seven governorships and over 300 state legislative seats, and lost a sizeable proportion of suburban white voters in key states they’ll need to win in 2020. But despite running brilliant high-profile candidates for governor in Florida and Georgia, Democrats appear to have fallen short of decisive wins. Why?

In the 2018 elections, racism was foundational to the Republican political strategy, a strategy that involved using their institutional power to prevent people of color from voting while using racist political rhetoric to drive turnout among rural white voters. And though we won’t know the final outcome of the election until all remaining ballots are counted (and recounted), election returns so far suggest this Republican strategy likely prevented Democrats from winning the governorship in Florida and Georgia.

Voter suppression by voter ID laws, long lines, and broken voting machines disproportionately affects Democratic candidates

The most glaring part of Republicans’ strategy was voter suppression. Republicans used a variety of methods during the elections to make it more difficult for Democrats to be able to vote. These efforts disproportionately targeted communities of color, who are more likely to vote Democratic.

For example, in Georgia, Republican gubernatorial candidate Brian Kemp used his position as secretary of state to purge an estimated 107,000 people from the voter registration rolls just because they had not voted recently — with the majority of counties purging black voters at higher rates than whites. He put another 53,000 voter registration applications “on hold” — 70 percent of which were from black Georgians. And when people showed up to vote in predominantly black counties, they faced impossibly long lines produced by the closure of 214 polling places since 2012, as well as faulty voting machines. Later, we would learn that 700 voting machines were left wrapped and unused in a nearby warehouse in Atlanta.

All of this happened on top of Georgia’s existing strict voter ID law, which imposed an additional barrier to voting that disproportionately disadvantaged black voters. Nationwide, 25 percent of black Americans lack government-issued photo ID, compared to only 8 percent of whites. A variety of systemic barriers make it harder for people of color to obtain a photo ID. For example, many older black residents lack birth certificates or other required documentation to get an ID. As a consequence, strict voter ID laws like Georgia’s have been shown to significantly and disproportionately reduce turnout among black and brown voters.

Similar issues were reported in Florida, where in addition to purges and polling place closures, there were widespread reports suggesting thousands of voters never received the absentee ballots they requested, and absentee ballots that were submitted by black and Latinx voters were rejected at higher rates due to “signature mismatch.” Taken together, these forms of institutional racism — political institutions imposing discriminatory barriers to voting — could have cost Stacey Abrams and Andrew Gillum the votes needed to defeat their opponents.

The GOP used racism to turn out its base

Institutional racism only tells part of the story: Throughout the midterm campaigns, Trump and the Republican candidates repeatedly used coded racist appeals to appeal to white voters. In the final weeks of the election, President Trump used his “bully pulpit” — the largest platform in the world — to spread racist and misleading narratives about immigrants.

In October, as a caravan of asylum seekers began walking from Central America towards the southern US border, Trump made claims that the caravan was made up of criminals and “unknown Middle Easterners” and was “invading” America. Then, a week before the election, the president released an anti-immigrant ad depicting an undocumented immigrant who murdered two police officers and implying that other “dangerous illegal criminals” were in the caravan. The ad was considered so racist that even Fox News stopped airing it.

These anti-immigrant narratives dominated the news cycle before the election. Exit polls showed that the strategy worked: Immigration was the single most important issue for Republican voters. In Florida and Georgia, exit polls show both DeSantis and Kemp voters considered immigration to be the most important issue in the election, while health care was the most important issue for those who voted for Gillum and Abrams.

Immigrants weren’t the only targets of this racism. Gillum and Abrams themselves were targeted with racist rhetoric. Trump called Andrew Gillum a “thief” while referring to his Republican opponent as “Harvard educated.” Gillum’s Republican opponent also evoked racist stereotypes by telling voters not to “monkey this up” by voting for Gillum.

In both Georgia and Florida, white supremacist groups organized racist robocalls to voters. These recorded messages called Gillum a “negro” and “monkey” and Stacey Abrams a “negress.” Research shows that priming white voters to think about race can significantly impact their support for black candidates. For example, studies show the darker a candidate’s skin, the less likely white voters are to support them, and that political appeals that make a black candidate’s race more salient to white voters significantly reduce their share of the white vote.

The GOP’s stoking of racist fears might have also driven people to vote against them

As Republican politicians made anti-immigrant and anti-black appeals to their base, rural white voters turned out at high rates to offset Democratic gains in the suburbs. Many of these voters are based in Southern states, where the legacy of racism lives on. White people living in counties where slavery was more prevalent in 1860 are significantly more likely to identify as Republicans, a party that today is working to dismantle civil rights protections and end programs that remedy racial inequities.

Moreover, these voters were more likely to harbor racist attitudes and political beliefs, such as reporting feeling warmer towards whites than blacks and opposing affirmative action. And nearly 2 million people in Florida and Georgia were prohibited from voting in the election because of felony disenfranchisement laws enacted during the Jim Crow era to suppress the black vote (fortunately, Florida voters repealed one of these laws this election by passing Amendment 4).

It’s possible that all of these factors didn’t matter enough to change the results by the one percent (or even half of one percent) needed to change the outcome. It’s possible that these blatantly racist appeals had the opposite effect for some voters: motivating people of color and some white voters to show up and vote Democrat.

But it’s hard to believe all of these tactics used in combination — each already proven to have significant and measurable impacts on their own in past elections — would not have some effect on these key elections. Now, as these candidates work to make sure all the votes that were able to be cast are all counted, it’s critical that we acknowledge and address the role that racism played in preventing many more people from participating. Racism, in the end, appears to have proven decisive.

Samuel Sinyangwe is an activist and data scientist focused on addressing racism and police violence in the United States through local, state, and federal advocacy. He is a co-founder of Campaign Zero, a national platform of data-driven policy solutions and advocacy tools to end police violence.

First Person is Vox’s home for compelling, provocative narrative essays. Do you have a story to share? Read our submission guidelines, and pitch us at firstperson@vox.com.