Texas Gov. Greg Abbott sought a record-tying third term on Tuesday, while Democrat Beto O’Rourke sought an upset in America’s largest red state in one of the most expensive midterm elections in U.S. history.

More than 5 million early votes were cast in Texas ahead of Election Day, where outrage over the Uvalde school shooting in May, which killed 19 children and two teachers, heightened an already tense race in which both candidates’ campaigns spent more than $200 million.

Five months later, Texas state police are still under fire for failing to apprehend the gunman at Robb Elementary School sooner. O’Rourke said the shooting, one of the deadliest classroom attacks in U.S. history, crystalized the stakes of the election as Abbott waved off calls for tougher gun laws.

However, Abbott, 64, has proven to be a formidable opponent in a state where Republicans have won every governor’s race since 1994.

He has rallied his base around a record number of illegal border crossings from Mexico into the United States, courted Hispanic voters in South Texas aggressively, and capitalized on economic anxieties and recession fears that have created headwinds for Democrats nationwide.

A victory for Abbott would strengthen his position as a potential presidential candidate in 2024, cement his position as the state’s second-longest serving governor, and extend decades of GOP dominance.

On Tuesday, O’Rourke was set to embark on one final campaign blitz through Dallas, San Antonio, and Houston before returning home to El Paso to await election results. Abbott spent election night in McAllen, Texas, underscoring the GOP’s growing confidence in a region that has long been a stronghold for Democrats.

O’Rourke’s hard-charging challenge has rekindled Democrats’ hopes while appealing to voters jaded by the Uvalde shooting, a strict new abortion ban, and the state’s power grid’s deadly failure in winter 2021. The former El Paso congressman has positioned himself as a new beginning for Texas and a check on the GOP-controlled legislature, promising to legalize marijuana and expand Medicaid.

However, four years after nearly winning a U.S. Senate seat in Texas, raising his profile in the Democratic Party, O’Rourke has faced more skeptical voters. Abbott has portrayed him as a liberal crusader, and O’Rourke has been forced to defend positions he took while running for president, particularly his support for mandatory gun buybacks.

A day after the Uvalde shooting, O’Rourke interrupted an Abbott news conference, telling him, “This is on you,” referring to the governor’s opposition to tougher gun laws. Republicans saw it as a tasteless political stunt, but O’Rourke supporters saw it as a genuine expression of their outrage.

Deborah Thompson said she voted for all Democrats, including O’Rourke, during early voting in suburban Dallas because Republicans threaten voting and abortion rights.

“I think that an 18-year-old girl that’s been raped should be able to get an abortion,” the 56-year-old Richardson resident said. “I’m not going back. I’m not going back to the ’50s … and I’m so angry at all of this.”

Janie Helms, a retiree, said worries about inflation led her to vote for Abbott.

“I see him as a conservative who will watch our money,” she said.