It is difficult to remember now, but there was a fleeting moment in 2016 when it seemed possible that public revulsion with Donald Trump would hand Democrats the state of Texas. That September, the Washington Post published a poll that showed Hillary Clinton with a one-point lead in the state. Her running mate, Tim Kaine, visited twice, saying that the campaign was taking Texas “very seriously.” For years, the state’s ethnic demographics — African-Americans and Latinos now make up a majority of the population — have made it look, to Democrats, like a ripe peach dangling at their fingertips. There was good reason to reach for it. “If Texas went blue,” Lawrence Wright writes in his recent book God Save Texas, “there would be a Democratic electoral lock on the presidency.”

And yet, for all the many years that Democrats have been dreaming about Texas, Republicans have kept creaming them in elections for president and senator and governor and lieutenant governor and attorney general and comptroller and land commissioner and agriculture commissioner and railroad commissioner. In fact, it has been nearly a quarter-century since a Texas Democrat has won any statewide race, the longest such losing streak in the nation. Hillary Clinton lost, too, though by just nine points, close to her margin in the traditional battleground of Ohio and closer than Barack Obama ever got. Amid their desolation, some Democrats saw a reason to hope that 2018 might finally be the year they break their Texas curse.

If ever there were a moment for Texas to flip, you would think it would be this one. Trump has equated Mexican immigrants with vermin and has locked children in cages at the border, a spectacle that has the potential to mobilize Latino voters. “Donald Trump is a great recruitment strategy for Democrats vis-à-vis Latinos,” Democratic National Committee chairman Tom Perez told me in late June as he rushed to a protest in Brownsville, Texas. But even before the family-separation policy erupted into a political crisis, Trump was showing signs of weakness in Texas. The president’s average Gallup approval rating over his first year in office was just 39 percent in the state, lower than in many places that are politically competitive. Of course, Trump won’t be on the ballot in the midterm elections.

But the senator who will be, Ted Cruz, is someone Democrats hate with a passion, and even he admits Republicans face a risky environment.

“There is no doubt that the far left in Texas and across the country is energized right now,” Cruz told me over the phone in April as he drove between West Texas campaign events. “We are going to see very high Democratic turnout in November.

“That being said,” Cruz went on, “there are a whole lot more conservatives in Texas than liberals.” That is the conventional wisdom, but Democrats believe there are latent reservoirs of liberalism just waiting for the right candidate to tap them. And maybe they have finally found one in Cruz’s opponent, Beto O’Rourke — the vigorous, toothsome, tech-savvy, culture-straddling congressman from the border city of El Paso, who might as well have been conjured to life in a South by Southwest keynote speech.

O’Rourke has defied the campaign strategies that his party usually employs, rejecting both Clintonian triangulation and data-driven microtargeting of likely Democratic voters. Instead, he is running as a populist insurgent in the mold of Bernie Sanders, driving all over the vast state, even to rural areas where Democrats are scarce, trailed by an iPhone camera that beams his every move to Facebook. His campaign has created a sensation both within Texas — where he draws huge, adoring crowds — and among his national social-media following. Largely through online appeals, O’Rourke has raised more than $13 million, more than any other Senate challenger, Republican or Democrat, and he has done so by running as an unabashed liberal.

At freewheeling town-hall meetings, O’Rourke espouses gun control, single-payer health care, and other progressive positions, sprinkling his speeches with folksy anecdotes and occasional profanity. But his signature issue is immigration. For months, even as national Democratic leaders have hemmed and hawed about the proper response to Trump’s outrages, O’Rourke has embraced immigrants regardless of their status — “The right thing to do is to legalize America,” he says — and rhapsodized about the Tex-Mex ethnic mix of the border region. On Father’s Day, he led a protest outside the tent city in Tornillo, where the authorities were holding unaccompanied minors.

“You have this moment where the very viability of our democracy is in question,” O’Rourke told me recently. “It just wasn’t within your imagination that we would be taking 3-year-old kids from their moms. Yet what I see everywhere I go is that people are definitely calling this out, and they’re describing their concern and the urgency and just how fucked up all this is.” That blunt message might seem better designed to appeal to a reader in New York than a swing voter in Texas, and yet O’Rourke has managed to pull within striking distance of Cruz. In mid-June, the University of Texas and the Texas Tribune published a poll that showed O’Rourke down by five points among registered voters, with 17 percent undecided. He’s been helped by a surge of local volunteers who found one another on Facebook. “They’ve just said, ‘Look, we’ve got to get this shit done because of what’s going on, and we’re the people to do it,’ ” O’Rourke says. “There’s a real power to it, and there’s a real joy in it.”

Feelings of power and joy have been rare for the Democrats these past two years. The coming midterms have taken on nearly existential importance for the party, but when it comes to control of the Senate, in particular, it will be fighting on Republican territory. Presuming Democrats hold all their own Senate seats in 2018 — far from certain — the balance of power in the chamber will likely hinge on the results in a trio of western states, Nevada, Arizona, and Texas. Of the three, Texas will be the hardest by far for Democrats to win, and it’s the biggest prize, not only for the symbolic power of defeating Ted Cruz but also because if O’Rourke is successful, he’ll have offered a radical model to competing: running as a true Democrat. “I think more than wanting you to think exactly the way they do, most people want to know what it is you really think,” O’Rourke told me. To those who question whether this assumption amounts to magical thinking, he offers little counterargument, just a winning smile.

O’Rourke on live feed from his hotel room in Houston on January 28. Photo: Bill McCullough

The first time I met Beto O’Rourke, seven years ago, he took me on a walk through dingy downtown El Paso. He was a city councilman then, lanky with a boyish mop of brown hair. We ended up at a low-lit dive called the Tap, a stone’s throw from the Mexican border, where O’Rourke ordered a Tecate and a tequila from the bartender in Spanish. He told me he loved the bar for its music and raffish clientele. He’d played in a band back in the ’90s with a guy who went on to found the Mars Volta. He’d once lived in a loft in Williamsburg. He was in his late 30s and owned a web-design firm. He and his wife, Amy, who ran a charter school in a historically Mexican neighborhood, had just had their third kid. He seemed like a familiar animal.

I was in town to write an article about the border, and he talked about building a thriving binational metropolis along the Rio Grande, knocking down the metaphorical walls that separated El Paso from Juárez, the neighboring Mexican city, which was gripped by drug cartels. “It’s so easy for people today to say, ‘What is this guy talking about — 3,100 people just got murdered in Juárez last year,’ ” he said. “But it is not going to be that way forever.” To address the root causes of drug violence, he had proposed marijuana legalization.

A few years later, he ran for Congress in a majority-Latino district. Although O’Rourke is of Irish descent — Beto is a Spanglish childhood nickname, short for Robert — he won a primary upset over a Democrat who was a senior member of the Congressional Hispanic Caucus. Then, shortly after Trump’s victory, he gave up his safe seat to run against Cruz, who was fresh off his presidential campaign. It seemed like a suicide mission, but then Doug Jones won in Alabama and Democrats started talking giddily about a gathering midterm wave. So in January, I went down to see if Beto really had a winning strategy.

“Name me the person, a Democrat, who’s figured out how to win races statewide in Texas,” O’Rourke told me late one Sunday night as he drummed his hands on the wheel of an SUV to Lee Morgan’s “The Sidewinder.” He was around 18 hours into a 24-hour campaign marathon, a stunt he and his spokesman, Chris Evans, had concocted to test his limits. The day began with a predawn run through Houston — a regular campaign event — where O’Rourke took questions from anyone who could keep up with his fast pace. Then it was on to a Nigerian-run doughnut shop; lunch at a soup kitchen, where he and Amy served the homeless; some town-hall meetings; and finally an evening “Bands for Beto” concert at a famous honky-tonk bar. Now he was, simultaneously, driving 85 mph down the highway, glancing over his shoulder to talk to me in the back seat, eating Mexican food, and eyeing the live-stream, which was on a phone in a holder affixed to the windshield. There were 204 people watching.

Defying the typical Democratic strategy of focusing on heavily populated urban areas, O’Rourke is stubbornly committed to running a statewide campaign. He recently fulfilled a promise to visit all 254 counties in Texas, which meant he’s spent a lot of precious time campaigning through lightly populated areas he has no prayer of winning. The size of the audience at any moment, whether on live-stream or in person, was less important than the narrative of his road trip, which he would recount in long fund-raising emails full of selfies taken with people he’d met along the way. The press was welcome to ride along, too, which resulted in a lot of adoring national coverage. This all raised delighted hackles among Cruz’s advisers, who maligned him as a phony ex–New Yorker with an affected nickname. “This is all Beto’s Excellent Adventure, and everyone is going along with him,” Jeff Roe, a consultant to Cruz, told me. “Actually, it’s Robert’s Excellent Adventure.”

O’Rourke’s campaign mantra is that Texas is not a red state, but a nonvoting state.

If only Roe could have witnessed the scene when we reached our destination, a midnight rally in Austin, where a guy in a star-spangled jacket juggled glow-in-the-dark pins and a folk guitarist led a crowd of young people in a sing-along. (O’Rourke entered to “You Are My Sunshine.”) Like other Democratic candidates around the country, O’Rourke is being swept along by the movement on the left. As the campaign has gone on, he has endorsed Sanders’s “Medicare for All” proposal. He has said he’d vote in favor of Trump’s impeachment and boasts of his F-rating from the NRA. Though he has not joined the call to abolish ICE, he has said he would “abolish the tactics” it has adopted. “He has kind of self-radicalized,” Roe said in June. “He’s become a hostage to the fund-raising clicks.”

The depressing problem for Democrats — and maybe also their opportunity — is that the Texas electorate looks a lot different from the Texas population. In 2016, only about 46 percent of the state’s roughly 20 million voting-age adults made it to the polls, one of the lowest figures in the country. Turnout for the last midterm election was even worse, around 25 percent. The Texans who do vote skew to the right and white. As Harry Enten pointed out earlier this year on FiveThirtyEight, a poll in 2016 found that a majority of Texas adults approved of President Obama’s performance, but when the sample was narrowed to likely voters, the results showed a Republican swing of 13 points. Around 36 percent of Texas’s adult population is Latino, but Latinos represented only 17 percent of the electorate in the last two midterm elections.

O’Rourke’s campaign mantra is that Texas is not a red state but a nonvoting state. But his plan for turning out voters is decidedly unscientific. He frequently mentions his “punk rock” ethos, touts his refusal to take PAC contributions, and says he doesn’t even employ a pollster. “This isn’t a political, corporate playbook that’s being followed,” he told a town-hall audience in the Houston suburb of Sugar Land. “There’s no focus groups. There’s no consultant who tells me what to say.” This DIY stance comes with some caveats: O’Rourke is relying on a Washington firm that masterminded Bernie Sanders’s digital-media campaign. But it isn’t entirely for show, either, which scares some admirers. There’s little room to make rookie mistakes against Cruz, who can call on a national fund-raising network built during his presidential campaign. “You can be scrappy for a little bit,” said one veteran Democratic political operative. “But Ted Cruz is going to drop $40 million on your head, and scrappy won’t cut it.”

Targeting a campaign’s message would seem particularly vital in a state like Texas, which is larger than France. Reaching voters at their doors requires vast organizational scale, and advertising in the state’s many media markets can cost around $1 million a week. Cruz knows how to turn out his hard-core conservative base, working through tea-party and religious groups. He may also be his party’s most innovative user of analytics. “We have the largest data-science team on the Republican side,” said his longtime pollster Chris Wilson. Wilson samples newly registered voters on a monthly basis, testing a variety of predictors for partisan leanings. “I have yet to score the voter file,” he said, “and have it be less Republican than the prior score.”

The trend is reflected in election results. The last Democrat to be elected at the top of the ticket was Governor Ann Richards in 1990. Since 1994, no Democrat has received more than 45 percent of the vote in a race for senator or governor. “Every four years, there are national-media stories all over the country about how this is the year the big blue wave is coming to Texas,” Cruz says with amusement. As often as not, Republicans have been winning by widening margins. “Suburban women in Virginia are different than suburban women in Texas,” Wilson claims. “Hispanics in Texas are different from Hispanics in California.” Regardless of their backgrounds, he argues, people living under conservative government tend to become more conservative. “There is an anthropological aspect to it,” Wilson says.

If it’s true that Texas turns people into conservatives, Cruz — born in Canada and the son of a Cuban immigrant — could be taken as a prototype. “We are on a path relatively soon to being a majority-Hispanic state, and in 2012, I ran unequivocally opposed to an open border, unequivocally opposed to amnesty,” he says. “And won 40 percent of the Hispanic vote.” Republicans have made a concerted effort to woo Latino voters, whom they believe to be conservative on issues like abortion and far from unified even when it comes to immigration.

So maybe it’s true that Texas is just different from a state like Nevada, which Democrats have lately turned into a battleground state by targeting Latinos, along with affluent suburbanites and moderates repelled by Trump. But it’s also possible that more complicated dynamics are at work. “The challenge for Texas is that it has not been a swing state since 1976,” says Julián Castro, the former mayor of San Antonio and Obama Housing secretary. “The resources haven’t been invested here to harness the Latino vote.”

Republicans have also used their monolithic control of government to erect structural defenses. Many Democratic strategists doubt they can win without a massive registration effort, but O’Rourke supporters can’t just sign people up. By law, they must first take a class and be certified as “volunteer deputy registrars” in the county where they operate. Partly as a consequence, most organizations that have had success in this area have relied on paid canvassers, not volunteers, which means diverting money from other campaign activities.

Then, registered Texan voters who make it to the polls have to get past the state’s stringent voter-ID law, which Democrats claim is flagrantly biased against them. A concealed-weapons permit is a valid form; a student ID is not. Republicans are eager to pursue any whiff of fraud. (A Texas judge recently sentenced a woman to five years in prison for voting while on parole.) If they reach the booth, they usually are presented with a ballot on which Democrats present only token competition. No wonder, Democrats say, that many voters are disengaged. “We suffer from a dynamic of some very concerted efforts to suppress the Democratic vote in our state,” says Wendy Davis, the party’s 2014 nominee for governor. “And it works.”

You might recall Davis as the Texas state senator who staged an impassioned filibuster against a bill restricting abortion that made her a national star. Her subsequent campaign for governor serves as a cautionary tale. Davis raised some $40 million from all over the country for her race against Republican Greg Abbott. She relied on a data-driven organization called Battleground Texas to register and turn out new Democratic voters. But Davis won just 39 percent of the vote, less than past candidates who hardly even tried.

The last Democrat to be elected at the top of the ticket was Governor Ann Richards in 1990.

Any hope O’Rourke has for improving on that performance begins with turning out the vote in the heavily populated counties surrounding Houston, Dallas, and San Antonio. Battleground Texas has registered around 123,000 voters over the past five years, half of them in those three counties, but Democrats need to do much more to turn them into strongholds. “We’re trying to be as strategic as possible,” says Crystal Zermeno, director of electoral strategy at the Texas Organizing Project, “given that most of our counties are as big as battleground states.” Harris County, where Houston sits, has a much larger population than Nevada. In 2016, Zermeno’s organization made some 1.2 million phone calls and door knocks in Harris County, which helped Hillary Clinton to carry it. O’Rourke will have to build on Clinton’s turnout numbers. From there, it doesn’t take a strategic genius to see the competitive path: dominate the other cities, woo the suburbs, limit the damage in the sticks. But it would take a huge amount of money.

“Think of the scale that it would require in a state like Texas,” says Emmy Ruiz, an Austin-based turnout specialist who ran successful campaign operations for Clinton in Nevada and Colorado. Ruiz is not affiliated with O’Rourke’s campaign, but she says she has been watching what he is doing with excitement — in part because his 254-county strategy seems a little crazy. “We are going places, as Democrats, that we haven’t been to for a really long time,” she says. O’Rourke now has 26 field offices spread around the state, including a paid staffer in the northwestern town of Lubbock, where Trump won 66 percent of the vote.

Many Democratic strategists presumed that, as November neared, O’Rourke would scale back his statewide strategy in order to focus on turning out traditional Democratic constituencies. O’Rourke rejects that as a “false choice.” While his campaign has been making some effort to register new voters, his advisers believe they can find a path to victory within the electorate as it already exists. Since only a small fraction of voters generally turn up for midterm elections, it’s just a matter of turning out the right ones. O’Rourke thinks he can win over moderate Republicans, and as a practical matter, he will have to. Governor Abbott is all but certain to be reelected this year, meaning that O’Rourke can’t win without some ticket-splitters. But when I asked him how he planned to persuade them, O’Rourke replied with disarming candor: “I don’t totally know, is the honest answer.”

Ted Cruz onstage during a January rally in Tyler, Texas. Photo: Bill McCullough

O’Rourke can look to a model for a grassroots rebellion in Texas. Inconveniently, though, it belongs to Cruz. He owes his career to an upset in the 2012 Republican primary, when he beat David Dewhurst, a formidable lieutenant governor. “If you look back to 2012,” Cruz says, “virtually all of the Texas political Establishment was opposed to our campaign. And we won the election based on this enormous grassroots tidal wave.” It is tough to keep the insurgent spirit burning, though, especially once you’ve conquered the government.

One Saturday earlier this year, I drove to a cattle ranch in East Texas for a rally and chili cookout sponsored by a tea-party group. Rain was pouring off the roof of the venue, a cavernous arena used for rodeos, as Cruz arrived. He signed a copy of Green Eggs and Ham, a book he famously read aloud during one of his epic filibusters, for a pair of little girls wearing matching dresses and graciously accepted condolences for his presidential campaign.

Cruz doesn’t talk much about 2016, maybe because he would rather not remind voters of the nasty names Trump called him, or the calumnies Trump lobbed at Cruz’s family, or the way he was booed off the stage at the Republican convention after refusing to endorse the nominee. Cruz vowed then that he would never be Trump’s “servile puppy dog,” but these days, he strives to prove he’s the man’s best friend.

In crisp jeans and cowboy boots, Cruz ambled across the muddy dirt floor of the arena to his campaign’s RV, known as The Cruzer, which was parked off to one side. “Democrats are united in absolute opposition to everything being done in Washington. They are being driven by the grassroots; they are being driven by their far-left base,” he told me. “I think we have the potential to pick up three, four, five, six Senate seats — if we can turn out conservatives. If the grassroots stay home, if the working men and women of this country stay home, we could have a terrible election year.”

In Washington, there’s been much talk over the past year about the “new Ted Cruz.” In recent weeks, he challenged the Trump administration over its treatment of families at the border, introducing a bill to increase the number of immigration judges while detaining families together (a position that passes for moderation in today’s GOP). But mostly he has been in lockstep with Trump’s policies. After a young man in a black cowboy hat warmed up the crowd with a song — “I think mahhh dog’s a Democrat,” he warbled — Cruz gave a fiery speech. “Let me give you a real simple proposition,” he said in discussing the status of the Dreamers. “We should not be granting citizenship to anybody here illegally.” He told a story about lobbying Trump to withdraw from the Paris climate accords. “The next morning, the president calls my cell phone, and he said, ‘Okay, Ted, I did it, what do you think?’ ” Cruz said he replied, “ ‘Mr. President, everyone who hates you is ticked off right now, and everyone who loves you is thrilled.’ ”

Cruz will never be loved — polls show only about 40 percent of Texans view him favorably — but he knows how to play on the politics of polarization. “You know, in Washington there’s a process that actually turns a dog into a Democrat,” he said, harking back to his opening act. “It’s when you take him into the vet to get him fixed.” He chortled at his own joke. “I’m gonna get in trouble for that one.”

Beto O’Rourke, right, prepping for a live-stream before a run in Houston. Photo: Bill McCullough

Cruz was probably less worried about breaching decorum than departing from his core message, which is that the Democrats are marching like white walkers. “With white-hot, blinding heat, they hate this president,” he warned the crowd. “And they will crawl over broken glass to vote.” That is true. One Friday evening in January, O’Rourke visited a home in the Dallas suburb of Richardson, where around 40 local resistance leaders were holding an organizational meeting.

“We’re kind of in the crux of a great big change,” said Kris Savage, a grandmother who runs a Beto-centric Facebook group. “He’s our standard-bearer.”

They were meeting at the home of a Muslim family who helped to found DFW for Beto, a group that has around 6,500 Facebook followers. Most of the volunteers were middle-aged women. Some had never participated in politics, or even identified as Democrats, before Trump. O’Rourke addressed the volunteers in the house’s columned rotunda. “The exciting thing about this moment — it is not the DNC, or frankly even the Democratic Party,” he said. “It is all of us coming together collectively.” He said he could sense the campaign taking on the feel of a movement. “This is the most special, amazing, magical thing that we’ve ever had a chance to be a part of in our lives,” O’Rourke said.

Later, Savage told me her story of radicalization, which followed a familiar path. After Trump’s election, she attended a local Women’s March and joined Indivisible, the Facebook-based protest group. Savage found, however, that Indivisible had an ambivalent relationship with the Democratic Party. Some activists just wanted to protest Trump, while others, like her, were more interested in defeating Republicans. Then, last year, Savage discovered the Facebook page of Austin for Beto.

The Facebook groups formed the backbone of O’Rourke’s campaign, but some of the online activists have been reluctant to go out and knock on strange doors. Savage is an exception. This spring, she told me about canvassing Democrats in a heavily Latino area of Fort Worth aided by an iPhone app that the campaign gave her. “All except for one had never heard of Beto,” she said. A couple of months later, around the time the family-separation issue was exploding, she went out again. Voters still didn’t know O’Rourke’s name.

On paper, O’Rourke would seem well positioned to reach Latino voters. He grew up on the border and speaks fluent Spanish on the stump. But in his first move of the campaign, Cruz questioned his ethnic authenticity, releasing a song to the tune of an old country hit. “Liberal Robert wanted to fit in,” it went. “So he changed his name to Beto and hid it with a grin.” O’Rourke told me he has always gone by the name. “Like, out of the womb,” he said. “It’s kind of a tradition that defies ethnicity or language.” In response to Cruz (whose own first name is actually Rafael), O’Rourke pointed to a childhood photo in which he wore a BETO sweatshirt. But the real issue for him was not the genuineness of the name. It was the fact that it was unknown.

Cristina Tzintzun, the leader of an activist group called Jolt, wrote a newspaper column warning O’Rourke not to take Latinos for granted. “Holding town halls is great, but activists go to town halls,” she said in April. “They create almost an illusion of how much power and reach you have.” She said some O’Rourke volunteers have come knocking around her neighborhood. “They’re mostly older white ladies who clearly are not from our communities.” But she soon received a call from O’Rourke, seeking advice. The campaign has since hired some of her group’s members as paid field staffers.

“I think they are aware that there is no way they can win without exciting black and brown voters,” Tzintzun told me recently. But she added, “Even with this crisis, there is a lot of national focus, but there’s not the dollars coming to organize yet.”

Tzintzun is one of several people who told me they had told O’Rourke he needed to focus more on the Latino community. Gilberto Ocañas, a veteran Democratic field operative, said that live-streams and rallies are unlikely to reach the working-class voters O’Rourke needs. “Their world ends somewhere a lot closer to their children and work and their church and their families,” he said. “They don’t know Beto O’Rourke, so you have to have someone they trust delivering that message.”

O’Rourke has been buying ads on Spanish-language radio, and despite his grassroots guerrilla strategy, he won’t be able to compete without also fighting an old-fashioned air war. All that advertising, plus building his turnout machine, will consume the $13 million he has raised long before November. While national Democratic organizations admire O’Rourke’s pluck, most appear disinclined to divert resources to Texas, and O’Rourke made a show of spurning one of his party’s top PAC donors, Tom Steyer. His high-minded stance may become liability, though, when Cruz calls on conservative PACs.

Similarly, O’Rourke has mostly refrained from attacking Cruz, much to the frustration of some in the resistance. “I do think it is a real danger in our democracy if we start dehumanizing one another,” O’Rourke told me in January. “There is a line that we can cross as a people, into some really dark stuff.”

You could argue that that Rubicon has already been crossed. In June, I spoke to a Democratic operative who was down at the border, protesting the Trump administration’s horrifying inhumanity toward migrant children, and asked whether she thought this could finally be the thing that sparks a revolt in Texas. She sighed. “Remember when we thought it would be galvanizing when he was talking about an entire swath of people being rapists and criminals?” Then Trump was elected president. Maybe the same policy that outraged liberals, she worried, would help Trump to rally his base.

Meanwhile, over on Facebook, there was a video feed of Beto, behind the wheel with a car full of staff, driving down a two-lane highway from Tornillo, where he had just visited imprisoned children. “This is the defining moment for our country,” he said. “The question is not yet answered who we are, and whether we are a country who would do this to kids, that would do this to families, that would do this to us.” He was at the El Paso airport, so he waved good-bye, and the screen went black. Bright and early the next day, in Fort Worth, he met Savage and a few hundred other followers for a morning run.

*This article appears in the July 9, 2018, issue of New York Magazine. Subscribe Now!