Just as Daniel Castro got home from work Tuesday, the 24-year-old turned on the TV. “I was waiting for seven o'clock to hit,” he said. “I got really excited thinking we might have a chance, but I was trying to force myself to relax.” He hoped, like millions of Texans, that Beto O’Rourke would become the state’s next US senator, breaking a three-decade-long losing streak for Democrats in senatorial races.

Castro, who lives in Dallas, started volunteering for O’Rourke in June, doing blockwalks and community events. He felt a responsibility not only to vote for family and friends who couldn’t, but to inform his community of O’Rourke’s message. “I knew what the odds were going in, but there’s something about the way Beto ran his campaign,” Castro said. “He had charisma. He united people.”

Then, as Castro and his wife Grecia Ramirez and her family watched coverage of the race at home, the news came in. “That was my fear,” Castro said.

O’Rourke did better than nearly anyone thought a progressive Democrat would do. According to the current vote totals, O’Rourke earned 48 percent of the vote, losing by a margin of only about 200,000 to Republican incumbent Ted Cruz. It was a strong showing, but O’Rourke was also the most hyped Texas Democrat in recent memory. He raised $69 million and talked to voters in every county in Texas. His campaign had knocked on nearly 2 million doors and placed more than 8.5 million phone calls to voters by the end of early voting. Signs of “Betomania” were everywhere.

So how did all of that add up to a loss?

Cal Jillson, a political science professor at Southern Methodist University in Dallas, said the problem wasn’t the candidate so much as the party. Democrats still have a long way to go to win statewide elections. “The Texas Democratic Party is very weak,” he said. “It has not built up its infrastructure over the last few decades.”

One telling sign of the difference between the two parties in the state was that Cruz was able to outsource his get-out-the-vote effort to Governor Greg Abbott’s campaign, which was working on behalf of all state Republican candidates.

“O’Rourke was forced to build infrastructure of his own,” Jillson said. “The Republican Party of Texas has an integrated voter turnout… Cruz could depend on the Texas Republican Party and Abbott. I think that’s a big part of the explanation.”

And even though O’Rourke didn’t win, political professionals on both sides said the outcome could portend bad news for the GOP in the future.

“What is historic is that a red state got within 3 percentage points of electing a Democratic senator," said Cristina Tzintzún of Jolt, a progressive organization working to engage Latinos. “That probably has Republicans shaking in their boots."

Republican political consultant and strategist Brendan Steinhauser thinks it should be a wakeup call. “I thought Cruz was going to win by a bigger margin,” he said. “Democrats overperformed, and Republicans have a lot to think about for the next election.” Headded the race proves that Republicans need to work harder and smarter, and that means reaching out to Texans who are not typically Republican targets like Hispanic, Asian, and African American voters as well as women. “We need build the Republican Party of the 21st century,” he said. “We don’t have to change our principles, but we have to change our rhetoric and message.”

Steinhauser said Will Hurd, the black Republican congressman who appears to be holding on to his seat in a majority Hispanic district, and Dan Crenshaw, the eyepatched veteran turned newly elected Republican US representative, provide a “case study for how the party can survive in Texas.”

The messaging of the current GOP is exactly what drove O’Rourke supporters like Castro to the polls. “That was a big motivator,” he said. “Today [our country] is so divisive that I couldn’t not get involved.”

This race was bigger than Texas. Jilson said that many voters cast their ballots in reaction to Trump And progressives around the country were hoping that an O’Rourke victory would signal a new direction in politics.

“[People] were watching this [race] for a long-term trend of Democrats being competitive,” Steinhauser said. “If Democrats are able to turn Texas blue, there will not be a Republican president again in our lifetime.”

There’s evidence that Texas is a lighter shade of red, at least. Democrats picked up 12 seats in the Texas House—not enough to flip the lower chamber of the state legislature, but enough to give them hope. “That’s a big deal,” Jillson said. “They’ve been losing House seats for years, and to pick up 12 is good for them.”

Added Steinhauser: “I think [O’Rourke] boosted turnout for the Democrats in such a way that it closed the gaps for congressional candidates.”

Ultimately, the O’Rourke campaign may have not prioritized Latino voters enough, Tzintzún said. As VICE previously reported, his campaign relied heavily on volunteer efforts and didn’t focus its resources on Latinos until the end of the campaign. Throughout the race, O’Rourke seemed to prefer reaching all voters at once rather than targeting specific demographics.

“The campaign lost because it didn’t spend enough time and money investing in black and brown voters early on,” Tzintzún said. “The model of town halls are great, but for most communities of color, you have to reach them at their communities.” Still, according to Latino Decisions, Latino voter turnout increased by more than 100 percent in 2018 compared to 2014—more than than any other group in Texas.

Steinhauser thinks O’Rourke simply ran out of Democratic and independent voters. “He did better than any Democrat in a generation,” he said. “There weren’t enough Democratic votes this year or enough moderates to get that final 3 percent that he needed. That may change in two years.”

Jenny Allum Moore, a Houston resident who’s been volunteering with the campaign since the spring, had expected O’Rourke to win. “He was a breath of fresh air,” she said. “Instead of focusing on fear and hate, he was focusing on being positive, working together.”

That message excited people more than Cruz’s, Moore said: “Everywhere I went, I didn’t feel a buzz for Cruz. I would see Beto shirts, signs everywhere. There was no buzz for Ted Cruz.”

Even in his concession speech, O’Rourke remained positive. “We’re not about being against anybody,” he said Tuesday. “We’re not going to define ourselves by who or what we’re scared of. We are great people. Ambitious. Defined by our aspirations and the hard work we are willing to commit in order to achieve them. Every single one of us from a big city to a small town, the people of Texas will do the great work of the country.”

Tzintzún said there are signs that Democrats could lose big in 2020, when Senator John Cornyn is up for reelection. And Jillson thinks a blue wave won’t hit Texas for years. “Texas is changing, it’s evolving in a Democratic direction,” Jillson said. “But that will be over a period of maybe ten years, and [Democrats will] have to work hard over those ten years.”

As the results starting trickling in Tuesday night, so did calls for O’Rourke to run in 2020 as a presidential candidate. But both Jillson and Steinhauser said a Senate race to unseat Cornyn is more likely.

Texas might not have turned blue in 2018, but it’s a changing political landscape. And Beto supporters like Moore are ready to help flip Texas in 2020. “This morning when I saw a lot of Democrats won on the local level, that gave me hope,” Moore said Wednesday. “Today I felt ready to go tackle these nonvoters. Now’s the time. We have two years.”