When Beto O’Rourke announced his long-shot run for U.S. Senate on March 31 of last year, he wasn’t just taking on a fight against Ted Cruz, he was waging a campaign against a quarter century of Texas history and simple electoral arithmetic. No Democrat had won a statewide race here since 1994—the longest losing streak for any Democratic state party in the country—and the party’s recent attempts to “turn Texas blue” had crashed and burned. The last great Democratic hope, gubernatorial candidate Wendy Davis, had lost to Greg Abbott by over 20 percentage points, and no Texas Democrat had managed even a single-digit loss in over a decade. In statewide elections in Texas, Republicans routinely beat Democrats by around a million votes.

If O’Rourke was going to have a chance, he needed to turn out a new electorate, a coalition of young voters, Latino voters, and Republican-leaning independents who might just propel him to a narrow victory. The rest of the Texas Democratic establishment made clear what it thought of such a plan. No other sitting congressman, state legislator, or big-city mayor attempted to join O’Rourke on the statewide ticket. Instead, O’Rourke ran atop the ballot as, effectively, a party of one.

O’Rourke spent more than nineteen months campaigning: he visited all of Texas’s 254 counties, launched dozens of viral videos, became a national political celebrity, and raised more money than any Senate candidate in the history of the union. All that, and he still didn’t quite manage the feat of winning.

But O’Rourke’s loss to Cruz by less than 3 percentage points was still transformative. Texas Democrats had their best election in more than two decades, in no small part because of the surge in turnout that O’Rourke generated. Underfunded, virtually unknown Democrats running for lieutenant governor, attorney general, and agriculture commissioner all came within 5 percentage points of victory, when double-digit losses were expected. Two Democratic political upstarts defeated longtime Republican incumbents in Houston and Dallas–area congressional districts, and six other Democratic congressional candidates came within mid-single digits of winning. Democrats made gains in both chambers of the state legislature and flipped four major appeals courts. If Texas ever turns blue, the architects of that victory will remember what happened on November 6, 2018.

But, at the election night party, as O’Rourke’s friends, family, and staffers gathered on the VIP level of Southwest University Park in downtown El Paso, the mood went from hopeful to grim. In the early going, it looked like O’Rourke might just have the votes to pull it off. But as more returns came in, a buzzing bar scene slipped into silence. O’Rourke’s friends stared at the CNN broadcast showing silently on TV screens. A projection of the unofficial returns showing Cruz with more than 50 percent of the vote popped briefly onto the outfield screen. There wasn’t a swell of chatter about the Democratic legislative gains in Houston and Dallas, nor of the surprisingly close defeats in the down-ballot statewide races. There was just the sinking realization that O’Rourke had lost.

Democrats will be playing Monday-morning quarterback for years to come. If O’Rourke had attacked Cruz earlier, would the results have been different? Should he have hired veteran political consultants, instead of trusting his campaign to a largely El Paso–based brain trust that had never worked on a statewide race? Should his progressive platform of universal health care and universal background checks for gun buyers have been more carefully calibrated to appeal to moderate Republican voters?

That’s tired thinking. O’Rourke’s long-shot bid was a leap of faith, and boldness was always going to be his best strategy. He needed to awaken what Democrats call the “non-voting” state, and he very nearly did.

Because of that, no Texas Democrat in a generation has been so well positioned after a defeat. There are already calls for O’Rourke to enter the sure-to-be-crowded Democratic presidential primary field in 2020. But, so far, O’Rourke has said he isn’t interested in running, and staying out of that fray is likely the smart choice. Running an insurgent progressive campaign against a conservative Republican wasn’t easy, but the battle lines were always clear. If O’Rourke were to run for the White House, he’d need to differentiate himself from a crowded field of other liberal Democrats who have their own throngs of passionate supporters. That would be a trickier task.

And if O’Rourke stays home he has an opportunity to finish what he started. The Texas Democratic Party has been searching for a leader since Ann Richards lost her re-election bid in 1994. There has been no galvanizing figure who can drum up thousands of donations with a single email, who can fire up the base stumping for other politicians, who can help recruit talented candidates and try to rebuild the long moribund state party. This will be less glamorous work than barnstorming across the state to speak to thousands of adoring voters. But it could turn out to have an even bigger impact. O’Rourke’s run for Senate was a proof of concept—that a charismatic Democrat running an energetic campaign could make Texas competitive. Now will come the grunt work—for Democrats, and maybe O’Rourke—of turning that campaign into a foundation of future victories.

This article originally appeared in the December 2018 issue of Texas Monthly with the headline “Coming Closer Than Anyone Could Have Expected.” Subscribe today.