After a surprisingly competitive Senate race that drew national attention to Democrat Beto O’Rourke, Ted Cruz has defeated his challenger and retained his seat in the Senate.

The incumbent Republican, who ran for president in 2016 but failed to win his party’s nomination, claimed victory in an outcome that wasn’t necessarily surprising. Texas is a Republican stronghold, with the party holding the governor’s mansion, both Senate seats, and safe majorities in both chambers of the state legislature. Of the 36 congressional districts, only 11 are held by Democrats.

But it comes as a major disappointment to Texas Democrats and many progressives nationally, who saw a once-in-a-generation opportunity with O’Rourke. The challenger made Cruz actually worry about his reelection campaign.

Related 4 winners and 2 losers from the 2018 midterm elections

Ultimately, Cruz, who argued in his campaign that O’Rourke was too far to the left, showed that conservatism is still deeply ingrained in Texas. Cruz made a point to call O’Rourke more radical than Sen. Elizabeth Warren (D-MA) and more to the left than Sen. Bernie Sanders (I-VT), the two most progressive sitting senators. He repeatedly called O’Rourke “extreme” — a strategy that ultimately paid off.

Cruz ran a conventionally conservative campaign; he defended his record against gun control, his dedication to repealing Obamacare, and his stance against giving young unauthorized immigrants a path to citizenship.

Cruz’s national presence made him vulnerable. He managed to fix his image.

Cruz rose to fame for his anti-establishment political theater in Washington. This was the senator who read Green Eggs and Ham to shut down the government over Obamacare and repeatedly trashed his own party as part of his political strategy.

Republicans warned that “likability” could be an issue in this race, and it’s because not too long ago, Cruz had a reputation for being a jerk.

Sen. Lindsey Graham (R-SC) once joked that if you “killed Ted Cruz on the floor of the Senate, and the trial was in the Senate, nobody would convict you.” Former Republican House Speaker John Boehner called him a “miserable son of a bitch.”

That persona propelled Cruz to the national stage with a presidential bid that was supposed to take the I’ll-be-an-asshole-for-America mantra all the way to the White House. Then Trump happened, and beat Cruz at his own game.

As Al Weaver detailed in the Washington Examiner earlier this summer, in the age of Trump, Cruz’s style has been much more muted. The most generous Republican observers say he’s been playing inside the state instead of on the national stage. More critical observers would say he’s lost his mojo, unable to rival Trump’s antics.

Either way, this came in handy, as the whole party mobilized around him. Cruz successfully convinced Republicans to be scared of O’Rourke and his calculation that defining him as a radical socialist would pay off seems to have worked.

For now, the notion of a blue Texas will remain just a Democratic dream.