Senator Jones. Photo: Justin Sullivan/Getty Images

A pro-choice Democrat just won a Senate race in Alabama. One year ago, this development would have seemed about as plausible as Bashar al-Assad winning a Nobel Peace Prize. Alabama had not elected a Democrat to any statewide office since Barack Obama’s inauguration. In 2016, the state’s conservative Republican senator Richard Shelby won reelection by 30 points. The last time the Yellowhammer State sent a Democrat to the Senate, Shelby was still a Democrat (and he was the one they sent). Alabamians hadn’t elected a nonincumbent, non-Republican, non-Shelby to the upper chamber since 1978.

Most pundits will explain Tuesday’s aberration with two words: Roy Moore. Or, if they’re feeling a bit more loquacious: The Republican Party drained the partisan loyalty of their voters by nominating an alleged sexual abuser of teenage girls, who claimed that Muslims and women shouldn’t hold public office, that blacks were better off under slavery, and that his interpretation of the Bible supersedes Supreme Court decisions.

This is certainly a large part of the story. But there was another, equally important piece of the puzzle: Democrats didn’t nominate an anti-gay activist who believes that critics of the “NAFTA superhighway” are being tortured in FEMA camps; or a retired engineer campaigning on a promise to murder his Republican rival in an electric chair; or a “shy” trucker who didn’t bother to vote for himself in the party’s primary — as they had done in three recent, statewide elections in the Deep South.

The Democratic Party has long made a habit of forfeiting races in hostile territory. In 2016, Democrats didn’t even run congressional candidates in every district that Hillary Clinton won. And throughout last year’s campaign, Clinton raised money for the Democrats’ red-state parties — only to funnel virtually all of it back into her presidential bid. This maneuver helped left-leaning billionaires give the Democratic nominee more funding than campaign finance laws would have otherwise allowed, but it also left red America’s lonely liberals bereft of resources for party-building.

Given this history, it wouldn’t have been surprising if Democrats had punted on Alabama’s special Senate election. The party had to recruit a candidate long before they knew Roy Moore would be the GOP nominee (let alone that the Republican standard-bearer might not be welcome in all of the state’s shopping malls). Democrats could have put up another underemployed infowarrior and let Moore, sex crimes and all, be the “statesman” in the race. Instead, they found Doug Jones, a former U.S. attorney who’d helped lock up domestic terrorists and Klansmen; a celebrated public servant with a résumé attractive enough to attract large sums of grassroots cash — and a personal background so squeaky clean, Steve Bannon couldn’t dig up dirt on him plausible enough to meet even Breitbart’s editorial standards.

Democrats had no reason to believe that they could win Jeff Sessions’s old Senate seat. But they prepared for that possibility anyway. Now, they’ve got to do the same in every state in the country — and not just because you never know when a Republican candidate will turn out to be a child molester.

The inconvenient truth for Democrats is that they have no hope of exercising federal power without investing in long-shot races in hostile territory. While Team Blue has won the popular vote in six of the last seven presidential elections, the emerging Democratic majority is increasingly concentrated in the urban centers of America’s most populous states. This demographic reality — combined with Republican gerrymandering — means that Democratic congressional candidates could win 7 percent more votes in next year’s midterm elections, and still fail to secure a majority of House seats. Just as critically, the concentration of Democratic support in cities and on the coasts means that the party will never enjoy full control of the federal government without winning Senate elections in heavily white, heavily rural states that can’t currently be trusted to prefer Democrats over sex criminals.

Right now, the party’s path to a (razor-thin) majority in the upper chamber after 2018 likely requires holding seats in West Virginia, North Dakota, Indiana, Missouri, and Montana — unless they can pick one up in Texas or Tennessee. Meanwhile, establishing some approximation of parity in House elections will require Democrats to influence redistricting efforts, and that will require the party to win some gubernatorial elections in improbable places. And, of course, Democrats will never regain a filibuster-proof majority — or the amount of power in statehouses they enjoyed in 2009 — without pulling off some straight-up state-level political revolutions.

None of this can be achieved without expending donor money (and activist energy) on a lot of losing campaigns. There are plenty of states and districts that Democrats can’t win in the next four years — but they might in the next eight, if they invest in the right lost causes before then.

Voting is a habit. And by neglecting to run compelling, state-level candidates in red states, Democrats have prevented many left-leaning constituencies from developing that custom. The party’s demographic disadvantages would be significantly ameliorated if nonwhite Americans registered to vote — and then, showed up at the polls — at the same rates as their white counterparts. According to the Census Bureau, 74 percent of non-Hispanic whites are registered to vote in the U.S. For African-Americans, that figure is 69 percent; for Latinos, it’s 57. If Democrats had spent more money bankrolling the long-shot campaigns of candidates with special appeal to Latinos in Texas, and African-Americans throughout the deep South, those racial gaps might be a bit narrower — and Democrats’ electoral math a bit less foreboding. Beyond expanding the electorate, investing in red-state Democratic parties and their candidates would also allow more Republican voters the opportunity to learn about progressive politics from an entity that isn’t bankrolled by Rupert Murdoch, Robert Mercer, or the Koch brothers.

In most cases, these investments won’t pay dividends for some time. Some may never. But eventually, somewhere, opportunity will knock. Most Republican candidates have never been banned from malls for hitting on middle-school girls. But nearly all of them subscribe to a fringe economic ideology that requires them to shift resources away from public goods and into the pockets of a reactionary donor class. And when conservative voters see what the trade-offs of “small government” actually are — bigger McMansions for the elite, four-day school weeks for the rabble — they might start longing for a new deal.

So, as tax-cut-induced austerity ravaged Oklahoma in 2016, Democrats decided to take a gamble. The party threw $200,000 at the state Senate campaign of a well-respected school superintendent looking to oust Republican incumbent Dan Newberry. They lost that race in west Tulsa County by 15 percentage points.

A few months later, Newberry stepped down from the Senate — and a 26-year-old lesbian Democrat won a special election to take his place.