As the Democratic Party looks back on this year and concocts its formula for 2018, party leaders may clash on what lessons to extract from the improbable victory of Doug Jones, Alabama’s first Democratic senator-elect in a quarter-century. It was about as far from a typical election as one could get: a special election in an off year that pitted an anti-establishment, openly racist alleged molester against a total newcomer to electoral politics. There can be few clear-cut takeaways from an experiment with so few controls.

But data from pre- and post-election polls support at least one rock-solid conclusion Democrats should heed in the build-up to next year’s midterms: Red-state abortion politics are not the intractable obstacle center-left partisans believe them to be. Democratic politicians in historically right-leaning states and districts need not hedge on reproductive rights to win elections. Nor must the party support the political aspirations of anti-choice candidates if it hopes to flip the balance of power in Congress.

Since Donald Trump’s election, leaders of the Democratic Party have cautiously expressed their intention to open the party up to more candidates who oppose abortion rights, ostensibly as a way to win back some of the white rural and suburban voters who supported Barack Obama in 2012 but voted Trump in 2016. This spring, DNC deputy chairman Keith Ellison and Sen. Bernie Sanders campaigned together in Omaha for a mayoral candidate with a record of sponsoring anti-abortion legislation.

Abortion seemed like it could be a flashpoint in the recent Senate race in Alabama, where Republican candidate Roy Moore strove to make it the No. 1 issue of the campaign. With an extra-high hurdle to clear after the candidate was hit with several credible allegations of sexual misconduct, Moore and his followers fell back on abortion, an issue they were sure they could win on against the generally pro-choice Jones. Moore spokeswoman Janet Porter, the activist behind the “heartbeat bills” that would ban abortions starting around six weeks’ gestation, congratulated a pregnant news anchor on her “unborn child” before claiming that Moore would “stand for the rights of babies like yours in the womb, where his opponent will support killing them until the moment of birth.” Kayla, Moore’s wife, told followers at a rally that Jones supports the imaginary procedure “full-term abortion,” in which doctors “suck a child’s brains out at the moment before birth.” In Trump’s Twitter endorsement of Moore, “pro-abortion” was first on the list of Jones’ disqualifying positions. Moore himself coined the hashtag #AbortionJones—a kickass name for a feminist superhero, if anyone’s looking for one—to smear his opponent.

The Moore campaign made every effort to turn Alabama’s anti-abortion evangelicals and Catholics against Jones, so had Jones suffered a narrow defeat, left-leaning pundits and Democratic leaders might have spent the past week and beyond taking a critical look at their own party’s abortion politics. They would have been left wondering whether Jones could have eked out a victory by wavering on his support for women’s rights—or whether the party should have run a less pro-choice candidate instead.

But Jones stayed firm, and polling data indicates that his resolve paid off. A Clarity Campaign Labs poll conducted before the allegations against Moore came out split intended Moore voters into two groups: those who said they’d never vote for a Democrat, and those who said they’d considered Jones before landing on Moore. Among voters who considered Jones, just 8 percent—1 percent of the total Alabama electorate—said the candidates’ stances on abortion determined their final vote. More than four times as many people said their “general dislike” of Jones swung them toward Moore. Party and personality mattered far more to Moore voters than abortion politics did. And Alabama voters are far more split on the abortion issue itself than conventional wisdom about the Deep South would suggest. A pre-election Washington Post poll found that nearly equal proportions of likely voters chose Jones and Moore when asked which candidate they “could trust more to handle the issue of abortion,” despite the fact that a majority of Alabamians support restrictions on abortion rights.

“When you look at the public opinion data, there aren’t that many hardcores who believe abortion should never be legal,” Richard Fording, a University of Alabama political science professor, told AL.com before the election. “It’s trending in a more liberal direction, and it’s more about where you draw the line.” Plenty of Alabama voters aren’t the kind of all-or-nothing anti-choicers who will withhold their ballots from any candidate who isn’t literally endorsed by a vocal supporter of violence against abortion providers, as Moore was.

There’s also evidence that some Alabamians with extreme anti-abortion views weighed that part of their political identity against the other issues and chose Jones anyway. Exit polls found that 34 percent of voters who thought abortion “should be illegal in most cases” voted for Jones, as did 18 percent of those who thought abortion should be completely banned. Since party affiliation aligns closely with abortion views in the U.S., a Democrat could not expect to do much better than that among anti-choice voters, and Jones didn’t have to compromise his support for abortion rights to win them.

This isn’t to say that Moore’s vocal opposition to abortion rights didn’t help him at all. It very well might have motivated some people who are otherwise unenthused by politics—or who may have stayed home rather than vote for an alleged abuser of teenage girls—to get to the polls. But a large majority of Alabama Republicans (71 percent!) straight-up didn’t believe Moore’s accusers. And Jones’ refusal to play by the GOP’s rules and moderate his views on abortion made it possible for progressives to feel good about backing him with their money and volunteer hours. Black voters, who support abortion rights by wider margins than whites, played a major role in Jones’ victory by turning out at rates approaching 77 percent of last year’s presidential election. Ninety-six percent of them voted for Jones, in spite of pro-Moore ads that told them “a vote for Doug Jones is a vote for more black abortions.” Those ad producers probably didn’t know that a majority of black Protestants, who make up about 16 percent of the Alabama electorate, support abortion rights.

“The lesson that we should all take from Alabama is that … you can be an unapologetic champion for reproductive health and rights and win—even in deep red states like Alabama,” Erica Sackin, spokeswoman for the Planned Parenthood Action Fund, told me in an email. “The majority of people in this country, 7 out of 10, support access to safe, legal abortion. That means more people in America support Roe v. Wade than support either the Democratic or Republican party.”

As a teachable moment, the case of Doug Jones offers a decent tutorial on winning a red-state election by running a genuinely progressive candidate that speaks to the base instead of creeping toward the center. In Alabama, black voters sealed a Democratic victory in the face of concerted voter suppression, in large part because of the work of black organizers and the party’s elevation of a good candidate with a history of prosecuting Klansmen. Because he didn’t have to rely on a handful of anti-choice independent voters or those fast-disappearing moderate Republicans, Jones could stand his ground on abortion rights, bolstering the faith of his supporters. This is a sound means of running a successful campaign, and it comes with a bonus: The Democratic Party doesn’t have to sell out women to win.