Ask anyone who was present at Hillary Clinton’s presumptive victory celebration on November 8 and they will tell you of the stunned silence, broken only by sobs, that settled across the vast glass enclosure of the Javits Center in Manhattan. Upstairs, in the suite where the candidate was closeted with her family and associates, the trauma was even more intense. As one attendee later reported to me, it featured the “full range of human emotions: screams, shock, fainting. Bill moved immediately to blame.” The former president, I was told, singled out campaign manager Robby Mook: “ ‘We should have fired that asshole months ago!’ It was awful.”

This funereal atmosphere was replicated wherever Democrats were gathered across the nation — with one instructive exception. In the Heights neighborhood of Houston, hundreds of revelers thronged bars along Studewood Street late into the night. “Any Houston Democrat who was anybody was there,” Doug Miller, a local reporter, told me later. “I looked up at the TV screens on the walls, I could see the whole country turning red, but everyone there seemed happy!”

The reason was simple. Unlike the rest of the country, Houston Democrats had a full-scale Republican rout to celebrate. The party had swept the polls in Harris County, the vast region encompassing Houston, arguably the nation’s most diverse city (as locals never tire of repeating). With 4.5 million inhabitants, the county is more populous than half the states in America. Now Harris voters had elected a Democratic district attorney — a very powerful post in Texas law enforcement — for the first time in thirty-six years. The Democrats had also captured almost every other slot on the ballot, including the tax assessor’s office, which oversees voter registration: a crucial win in an age of Republican voter suppression.

Furthermore, these local victories carried over to the top of the ticket. Though it probably did little to lighten the mood in the Javits Center, Hillary Clinton trounced Donald Trump by more than 160,000 votes in a county that Barack Obama had carried by fewer than a thousand in 2012. While others in the defeated party were subsiding into melancholy, hand-wringing, and consolatory tales of Russian hackers, the county’s newly elected sheriff, former Houston police sergeant Ed Gonzalez, was assuring supporters that he would defy any orders to round up undocumented immigrants. Across the street, the new D.A., Kim Ogg, promised her exuberant audience a progressive agenda: “We’re going to have a system that doesn’t oppress the poor.”

Voter endorsement of such progressive positions, well to the left of anything Clinton promoted during her message-lite campaign, was all the more dramatic in this reddest of red states. The prospect of life under an administration populated with avaricious plutocrats, xenophobes, and religious fanatics may chill the blood of countless Americans, but Texans have been living in such conditions for decades. Pertinent examples abound, not least the unremitting legislative assaults on Texan women, the latest being a proposed rule requiring that fetal tissue from abortions or miscarriages be expensively interred or cremated. Add to that cash-starved public schools, cuts in services for disabled children, record-breaking numbers of uninsured, lack of compensation for injured workers, the wholesale gutting of environmental regulations, soaring inequality, hostility to immigrants, and multiple restrictions on voting rights. Texas may therefore serve as an example of what could be in store for the rest of us. “The Texas Republicans have done a good job on voter suppression,” Craig Varoga, a Democratic political consultant and veteran of many election battles across the state, told me gloomily. “Now you’re going to see the same thing happening nationally, with the blessing of the Department of Justice.”

Republicans have ruled Texas since 1995, gaining absolute control in 2004 thanks to an unblushing exercise in gerrymandering that drove Democrats from their last bastion in the state House of Representatives. Their years in power have been marked by an increasingly aggressive push to the right. Governor George W. Bush was succeeded by Rick Perry, the overseer of more executions than any governor in modern American history. Perry was followed in turn by Greg Abbott, an ardent proponent of fetus funerals and eager assailant of public-school funding. In 2015, he put the Texas State Guard on alert, spurred by a right-wing conspiracy-monger’s warnings that an upcoming U.S. Special Forces exercise might be cover for an Obama plot to invade and occupy the state.

His own convictions aside, the personally affable Abbott may deem such measures wise in order to protect his flank against Dan Patrick, the aggressively conservative and highly ambitious lieutenant governor. A former talk-show host and sports-bar owner so avid for publicity that he once underwent a vasectomy on live radio, Patrick won the 2014 primary election by running to the right of the incumbent, a Republican already viewed as an extreme conservative. Unsurprisingly, he is now a vehement crusader against such looming threats to the republic as immigrants, sharia law, and transgender bathrooms.

“Patrick’s going crazy over the bathroom issue,” Bill Sadler, the longtime host of a weekly salon of politicians and journalists at his Houston restaurant, told me. “Every business organization in the state is trying to get him to shut the hell up, but he won’t do it. He’s our Donald Trump. He’s the nicest guy in the world — I’ve played poker with him — but put him in front of a microphone and he just goes crazy with Trumpisms.” Citing Patrick’s formerly indulgent attitude toward immigrant workers in his sports bar, whom he treated “like he was their daddy,” Sadler saw the lieutenant governor’s fulminations as pure opportunism. “It’s a political thing — the hypocritical, two-faced son of a gun.”

Once upon a time, of course, Texas was a one-party Democratic state. It produced and consistently reelected such political giants as Lyndon Johnson and Sam Rayburn, not to mention Wright Patman, the twenty-four-term populist congressman who once enquired of Federal Reserve chairman Arthur Burns at a hearing: “Can you give me any reason why you should not be in the penitentiary?” But those days are long gone, along with the rural and working-class white Democrats who could be relied on to pull the lever for the ruling party. The last governor the Democrats managed to elect, in 1990, was Ann Richards, given to such feisty pronouncements as her reference to the elder George Bush being born “with a silver foot in his mouth.” Richards eked out a slim victory among a coalition that included white suburban voters — but lost her reelection bid to the younger George Bush in 1994, ushering in an age of darkness for Texas Democrats.

That pall has spread across the country at an accelerating rate, as more and more statehouses and governors’ mansions fall under Republican occupation. Yet Texas, after leading the country in a slide to the right, might now be showing us the way out.

Amid the happy lawyers, journalists, and other movers and shakers at the victory parties, one group of seventy-five men and women, who had arrived on a chartered bus, stood out. Most of them were Latinos, like Petra Vargas, a Mexican-born hotel worker who had spent the day walking her fellow immigrants to the polls. Others were African Americans, such as Rosie McCutcheon, who had campaigned relentlessly for the ticket while raising six grandchildren on a tiny income. All of them wore turquoise T-shirts bearing the logo top. Not only had they made a key contribution to the day’s results — they represented a new and entirely promising way of doing politics in Texas.

The Texas Organizing Project was launched in 2009 by a small group of veteran community organizers. Michelle Tremillo, a fourth-generation Tejana (a Texan of Mexican descent), grew up in public housing in San Antonio, where her single mother worked as a janitor. Making it to Stanford on a scholarship, she was quickly drawn into politics, beginning with a student walkout in protest of Proposition 187, California’s infamous anti-immigrant ballot measure. By the time she graduated, the elite university had changed her view of the world. “I always knew I was poor growing up, and I even understood that I was poorer than some of my peers that I went to school with,” Tremillo told me. What she eventually came to understand was the sheer accumulation of wealth in America and its leveling effect on the rest of the population: “We were all poor.”

Both Tremillo and her TOP cofounder Ginny Goldman, a Long Island native, had worked for ACORN, the progressive national community organization that enjoyed considerable success — registering, for example, half a million minority voters in 2008 — before becoming a target of calculated assaults by right-wing operatives. By 2009, the group was foundering, and it was dissolved a year later.

In response, the activists came up with TOP. Goldman, who was its first executive director, told me that TOP was designed to focus on specific Texan needs and realities and thereby avoid the “national cookie-cutter approach.” The organization would work on three levels: doorstep canvassing, intense research on policy and strategy, and mobilizing voter turnout among people customarily neglected by the powers that be.

Despite Houston’s international cachet as the headquarters of the global oil industry, the Johnson Space Center, the Texas Medical Center (which employs more people than the entire United States coal industry), Rice University, and other dynamic manifestations of power and prosperity, many of its neighborhoods are more evocative of the Third World than the moon landings. Open ditches, often choked with garbage, line the streets of poor districts such as the Third Ward, Acres Homes, and Sunnyside. Thanks to Houston’s zealous rejection of zoning in any shape or form, industrial sites, including the huge Valero refinery in the Manchester district and the abandoned CES Environmental Services plant in South Union, a cemetery of toxic chemicals, sit just across backyard fences. It was in these neighborhoods that TOP found its constituency, and its first campaign.

A year before the organization’s founding, Houston had been hit by Hurricane Ike. As the storm roared across the flat expanse of the city, it cut an especially devastating swath through the poorer neighborhoods, damaging thousands of houses and stripping the roofs off many. The city handed out blue tarps as temporary protection against the elements. Months went by, and then years, and people were still living under the tarps. The city had access to $151 million in recovery funds (an initial tranche was quickly spent elsewhere), but Annise Parker, the mayor at the time, had earmarked that cash for fixing developer-owned apartment buildings.

“The developers were well organized,” observed Tremillo. But municipal authorities soon discovered that previously powerless people were getting organized, too. Securing the city’s master list of 2,000 applicants for disaster relief, Goldman mobilized them to put pressure on the obdurate mayor in meetings and demonstrations. She also enlisted the support of key outsiders who had a veto on how the money was spent, and in December 2011, she finally negotiated a settlement that totally rebuilt the houses.

It was a masterful and successful campaign. Yet it left the power structures in the city, the county, and the state undisturbed. The TOP founders and their colleagues, including another Stanford graduate, Crystal Zermeno, a Tejana math whiz whose mother grew up sleeping on the floor, began to ponder ways to change that. Might it be possible to mobilize enough voters to elect progressives to statewide office? For non-Republicans in Texas and elsewhere, the most galling aspect of recurrent electoral defeat has been the persistent failure of supposedly natural allies, specifically Latinos and African Americans, to show up at the polls. For years, Democratic officials and commentators had cherished the notion that natural growth in the minority population, which rose from 20 percent to nearly 40 percent of the U.S. population between 1985 and 2015, would inevitably put the party back in power. Yet these designated agents of change seemed reluctant to play their part. As I was incessantly reminded in Houston, “Demographics are not destiny.”

The problem has been especially acute in Texas, which produced the lowest overall turnout of any state in the 2010 midterm elections. Three million registered African-American and Latino voters stayed home that year, not to mention the 2 million who were unregistered. The result was a state government subservient to the demands and prejudices of Republican primary voters, and unrepresentative of the majority in a state where almost one in four children lived in poverty, 60 percent of public-school students qualified for free or subsidized lunches, and the overall poverty rate was growing faster than the national average. Following the crushing Republican victory in 2010, TOP launched an ambitious project to discover, as Zermeno put it, “who was not voting, and why.”

Digging deep into voter files and other databases, Zermeno confirmed that Texas contained a “wealth of non-voting people of color.” Most of them were registered, but seldom (if ever) turned up at the polls. The problem, she noted, was especially acute with Latinos, only 15 percent of whom were regular voters. In her detailed report, she calculated precisely how many extra voters needed to turn out to elect someone who would represent the interests of all Texans: a minimum of 1.1 million. Fortuitously, these reluctant voters were concentrated in just nine big urban counties, led by Harris.

Ever since the era of Ann Richards, Democrats had been focusing their efforts (without success) on winning back white swing voters outside the big cities. But Zermeno realized that there was no reason “to beat our heads against the wall for that group of people anymore, not when we’ve got a million-voter gap and as many as four million non-voting people of color in the big cities, who are likely Democrats.” By relentlessly appealing to that shadow electorate, and gradually turning them into habitual voters, TOP could whittle down and eliminate the Republican advantage in elections for statewide offices such as governor and lieutenant governor, not to mention the state’s thirty-eight votes in the presidential Electoral College. In other words, since the existing Texas electorate was never going to generate a satisfactory result, TOP was going to have to grow a new one.

There was, however, still another question to answer. Why were those 4 million people declining to vote? TOP embarked on a series of intensive focus groups, which were largely financed by Amber and Steve Mostyn, a pair of progressive Houston claims attorneys. (Their string of lucrative settlements included some with insurance companies who had balked at paying claims for Ike-related house damage.) Year after year, the Mostyns had loyally stumped up hefty donations to middle-of-the-road Democrats who doggedly pursued existing voters while ignoring the multitude who sat out elections all or most of the time. When TOP asked these reluctant voters about their abstention, the answer was almost always the same: “When I have voted for Democrats in the past, nothing has changed, so it’s not worth my time.” There was one telling exception: in San Antonio, voters said that the only Texas Democrat they trusted was Julián Castro, who ran for mayor in 2009 on a platform of bringing universal pre-K to the city, and delivered on his promise when he won.

“There’s this misunderstanding that people don’t care, that people are apathetic,” Goldman told me. “It’s so not true. People are mad and they want to do something about it. People want fighters that will deliver real change for them. That’s why year-round community organizing is so critical. People see that you can deliver real impact, and that you need the right candidates in office to do it, and connect it back to the importance of voting. It’s the ongoing cycle. We see winning the election as only the first step toward the real win, which is changing the policies that are going to make people’s lives better.”

Beginning with the 2012 election, TOP canvassers — volunteers and paid employees working their own neighborhoods — were trained to open a doorstep interview not with statements about a candidate but with a question: “What issue do you care about?” The answer, whether it was the minimum wage or schools or potholes, shaped the conversation as the canvasser explained that TOP had endorsed a particular candidate (after an intensive screening) because of his or her position on those very issues. These were not hit-and-run encounters. Potential voters were talked to “pretty much nonstop for about eight to ten weeks leading to the election,” according to Goldman. “They got their doors knocked three to five times. They got called five to seven times. They signed a postcard saying, ‘I pledge to vote.’ They circled which day they were going to vote on a little calendar on the postcard, and we mailed those postcards back to them. We offered them free rides to the polls. We answered all of their questions, gave them all the information they needed, until they cast a ballot. And what we saw was that the Latino vote grew by five percentage points in Harris County in 2012.”

Two years later, Texas Democrats nominated Wendy Davis, a state senator, as their candidate for governor following her filibuster against further restrictions on abortion rights. Her stand brought her national attention, a flood of campaign money, and the arrival of out-of-state Obama operatives who vowed to boost minority registration. Yet she lost by 20 percent to Greg Abbott and scored comparatively poorly with Latinos. Meanwhile, in the same election cycle, TOP and its allies blocked a bid by business interests to privatize the public-school system in Dallas. A year later, the organization helped to elect Sylvester Turner, a black Democrat, as mayor of Houston.

Goldman, Zermeno, and Tremillo (who took over as executive director of TOP in 2016), came to their progressive politics by observing the world around them. Others active in the organization learned about society’s injustices through direct, personal, brutal experience. In 2003, Tarsha Jackson, an African-American single mother living in the dilapidated Greenspoint neighborhood, discovered that her twelve-year-old son, Marquieth, had been sentenced by the Texas Juvenile Justice Department to nine months in prison. His crime: breaking a fifty-dollar window at a neighborhood swimming pool. The boy had already spent time behind bars for various misdemeanors, such as kicking a teacher while being restrained in a special-education class. These Dickensian punishments had been sanctioned by a 1995 overhaul of Texas school discipline, which prescribed zero tolerance and immediate recourse to law enforcement for unruly children.

“My son served three and a half years for a misdemeanor as a child,” Jackson told me over lunch at Gloria’s Latin Cuisine, one of a thriving chain of Salvadoran eateries across Texas. “They kept moving him to different jails far away.” In total, Marquieth Jackson served five years as a juvenile. Appeals to the A.C.L.U. went nowhere. “They weren’t interested. So I started organizing for myself.” Founding Texas Families of Incarcerated Youth with two other mothers in similar straits, Jackson mounted an intense campaign, complete with demonstrations, media appearances, and tireless lobbying. In 2007, she succeeded in getting Texas Senate Bill 103 passed, which banned the jailing of children for minor misdemeanors, although, as she points out, “it took a white boy getting raped in jail for them to finally do it.”

By the time TOP was preparing for the 2016 election, in which numerous local offices were in play, Jackson had joined the organization as the director for Harris County. The membership, expected but not obliged to pay five dollars in monthly dues, had grown steadily since 2009. Petra Vargas, the hotel employee, recounted to me over barbecue how she had eavesdropped on a TOP conference while at work, joined on the spot, and attended her first demonstration the next day. Regular actions, such as the protest that led to a partial cleanup at the toxic CES plant, helped mobilize others. Feedback from the membership showed that there was a host of urgent issues on voters’ minds, such as low wages and poor schools. It was the death of Sandra Bland, however, that propelled criminal justice to the top of the list.

Bland, a twenty-eight-year-old African-American activist, was arrested in July 2015 in Waller County, just an hour’s drive from Houston. A state trooper pulled her over for changing lanes without a turn signal. Three days later, she was found dead in her jail cell, an alleged suicide. Bland’s arbitrary arrest and suspicious death aroused a national furor. But the reason she was still in jail after three days was all too familiar to hundreds of thousands of poor people, especially African Americans, in Houston and elsewhere across Texas: bail for this very minor traffic offense had been set at $5,000, and neither she nor her family could raise the $500 down payment demanded by the bail bondsman.

Tarsha Jackson herself had gone to jail in the 1990s thanks to traffic tickets. (“No inspection, no insurance, no child seat, I couldn’t afford it.”) Now, while launching a petition demanding an investigation into Bland’s death, she and her colleagues in the Houston TOP office sat down and built an agenda around criminal-justice reform. As she explained to me, many of TOP’s latent voters had experienced similarly punitive brushes with the legal system, which they were often reluctant to discuss. “They felt ashamed,” she told me. “Our canvassers on the doorsteps were telling them: ‘It’s okay to talk about this.’ It sucks!”

Rosie McCutcheon could cite her own experiences when discussing law enforcement with potential voters. Like Jackson, she had been picked up for driving without insurance or registration, back in 2003. She was fined $795 and consigned to the county jail, gaining release when she agreed to perform community service at an assisted-living facility. But the county lost the records of her service, and in 2008 she was arrested again — on her own porch, in front of her grandchildren.

By that time, her initial fine had ballooned to $2,100. That was largely due to the Driver Responsibility Program, introduced by the state in 2003, which had little to do with inducing responsibility and a lot to do with closing a $10 billion budget gap by adding supplements to preexisting fines. Hence McCutcheon’s spiraling debt, augmented by a payday loan at 100 percent interest to raise her original bail.

True to its threefold mission — canvassing, policy research, direct political action — TOP has taken on the bail system, whose vicious nature was most vividly revealed in a series of videos that the organization unearthed last year. One after another, inmates at the county jail file in front of a monitor showing the “TV judge”: a magistrate sitting in an office across town. In one video, the judge confronts Anthony Goffney, an elderly homeless man with dementia who had been arrested four days earlier for trespassing, and who clearly has no idea what is going on. “Bond is set at five thousand dollars!” snaps a hearing officer. (When the same officer asks Goffney whether he’s requesting a court-appointed lawyer, his answer is, “Who, me?”) In another video, the magistrate doubles a woman’s bail to $2,000 simply because she answers “Yeah” to a question instead of “Yes.”

It was just such cases, multiplied thousands of times and brought into sharp, horrifying relief by the death of Sandra Bland, that made criminal-justice reform the centerpiece of TOP’s agenda in 2016.1 Among Harris County candidates, the leading proponent of reform was Kim Ogg, the Houston defense attorney and former prosecutor who was elected as D.A. in November. Like most of the other candidates, Ogg faced a grilling by a roomful of TOP members before the organization gave her its endorsement.2

1 As criminal-justice reform became a national issue, funding from outside groups began flowing into Texas, and some, such as the Open Philanthropy Project, invested in TOP’s nonpartisan organizing and public-education efforts. Full disclosure: my daughter Chloe Cockburn directs criminal-justice grantmaking for Open Philanthropy.

2 Another candidate, Maria Jackson, running for reelection as a judge, had jailed Rosie McCutcheon in 2008. McCutcheon nonetheless voted to endorse her. “I thought she’s changed,” she told me.

Sitting in a coffee shop in the Heights a few weeks after her victory, Ogg agreed that she had been lucky in her opponent, incumbent D.A. Devon Anderson, appointed in 2013 by Rick Perry to succeed her deceased husband. Though advised by Dan Patrick’s favorite political consultant, Allen Blakemore — the “Darth Vader of Texas politics,” according to Ogg — Anderson appeared to go out of her way to step on political land mines. Most notoriously, she refused to apologize for jailing a mentally ill rape victim to ensure that she would be on hand to testify against her attacker. When this came to light during the campaign, along with the news that the victim had been attacked while locked up, Anderson stoutly defended her decision. “She said she would do it again, if necessary,” Ogg recalled in wonderment. Toward the end of the campaign, Anderson resorted to personal attacks on Ogg, who is gay. (“She called me a lesbian for the last three weeks.”)

When we spoke, Ogg was full of praise for TOP, especially for its work highlighting punitive sentences for low-level misdemeanors, and she appeared committed to changing the system. Indeed, when we met for coffee, she was on her way to the office to fire thirty-seven of Anderson’s prosecutors. I asked her what would happen if state authorities directed Houston police to arrest undocumented immigrants, a likely Republican demand. “We’ll deal with that when we get there,” she answered diplomatically. Yet she went on to suggest that the county “could easily be in the front line” when it came time for local governments to resist such state or federal mandates.

Harris County is by no means the only arena in which TOP and its allies scored convincingly in 2016. East Dallas County, a band of suburbs to the east and south of Dallas, comprises House District 107 in the state legislature. Despite a Latino and African-American majority, Republicans have been carrying the district for years, albeit with narrow margins. This time, however, thanks to an intense registration and organizing drive by TOP and other groups, including labor unions, Victoria Neave, the Democratic candidate, ousted her Republican opponent by 836 votes.

“The interesting thing about that race,” Amber Mostyn told me, “is that the Republicans spent around a million dollars. There was no more than three hundred and fifty thousand dollars spent on our side, and no television — the Republicans probably spent half a million dollars on TV. Our campaign was focused on getting folks to turn out, and we knew that a lot of them don’t have time to watch a bunch of TV. They’re working two jobs, they’re not engaged in the political process anyway, so if they see a commercial, it means nothing to them. But Victoria Neave was out talking to people, TOP was out talking to people, labor was out talking to people — it’s the one-on-one engagement that makes the difference.”

It seems fair to say that the strategy deployed in this race (and in others discussed in this article) is the precise opposite of that adopted by Hillary Clinton’s team in 2016. Rather than asking voters what they actually cared about, the Clinton campaign and its associated super PACs spent $1.2 billion, much of it on TV commercials, and relied on Ada, a computer program, for key decisions, while remaining ignorant of what was happening in the real world. For example, around ten days before the election, members of the service-employees’ union in Iowa, where Clinton was clearly a lost cause, set off in a convoy of buses to campaign in Michigan, where the Democratic candidate’s lead appeared to be ebbing. According to Politico, Clinton headquarters in Brooklyn ordered the Iowans to turn around and go home. Their model still showed Clinton winning Michigan by five points. They therefore insisted that the S.E.I.U. foot soldiers would be better employed in Iowa, where they might delude Donald Trump into thinking that he was in trouble and thus force him to divert resources from elsewhere. Yet Michigan was indeed slipping away, a fact that Clinton apparatchiks could easily have discovered had they taken the slightest interest in communicating with anyone who could tell them the truth.

In contrast, TOP devoted energy and resources to ensure immediate feedback from the streets. Senior campaign managers took time to accompany canvassers on their rounds, with the aim of hearing for themselves whether their tactics needed to be tweaked or replaced. Meanwhile, all canvassers carried iPods and instantly entered the data they gleaned from their doorstep interviews. “We’d look at the numbers every evening,” explained Zermeno, “to see if there were any trends. Then, in the morning, when the canvassers all came in, we’d ask the questions. Did we change the rap? Are you guys hearing something? Then we could tweak the message on the spot.”

“Demographics are not destiny,” Craig Varoga remarked to me at the end of a long conversation. “But demographics with hard work and smart decisions are destiny.”

In a post-election memo, Zermeno discussed the various victories and near-victories scored around the state. “In the deep red South,” she wrote, “this election demonstrated what we’ve believed about Texas for many years: Texas is the future. . . . Sí se puede.” Yes we can.