In 2008 and 2012, Republicans couldn’t pull this off. Party elites backed John McCain and Mitt Romney, both of whom had records of bipartisan achievement and ideological independence that might have made them attractive to swing voters. But McCain and Romney faced so much hostility from the GOP’s conservative base that in order to win the nomination, and then ensure a decent base turnout in November, they had to repudiate the very aspects of their political identity that might have impressed independents. McCain, who had once called Jerry Falwell and Pat Robertson “agents of intolerance,” made another such agent, Sarah Palin, his running mate. Romney, who given his druthers would likely have supported comprehensive immigration reform, instead demonized illegal immigrants to curry favor with the GOP base.

This year has been different: GOP activists have given their candidates more space to craft the centrist personas they need to win. First, in senate races in North Carolina, South Carolina, Kentucky, Alaska, Tennessee, Georgia, Kansas and Texas, comparatively moderate Republicans triumphed over Tea Party-backed challengers. Then many of those Republicans downplayed their opposition to gay marriage and highlighted their support for greater access to contraception in an effort to win over the young and women voters who in past elections spurned the GOP as too extreme. “On social issues,” wrote Slate’s Will Saletan, “Republicans are mumbling, cringing, and ducking. They don’t want the election to be about these issues, even in red states.”

Sincere or not, these efforts to not appear retrograde and extreme helped Republicans say close among women voters. And yet conservatives turned out for them in huge numbers nonetheless. Thus, Republicans in 2014 combined candidate impurity with grassroots passion, which is what they’ll need to do to win in 2016.

Achieving this combination is tougher in presidential elections. It’s hard to deviate from Limbaughesque orthodoxy when you’re competing for the hard right voters who dominate the Iowa caucuses and the South Carolina primary. Still, it’s striking that Rand Paul, the Republican who has been most willing to buck ideological convention on race, crime and foreign policy, has so far not paid a political price. A lot may depend on Ted Cruz: The more successful he becomes, the more pressure other Republican contenders will feel to ape his ultra-right stances. But if the 2010 midterms revealed a GOP fixated on ideological purity, 2014 has showcased the party’s new tolerance, and even enthusiasm, for pragmatism.

The GOP brand remains terrible, and the party still faces huge challenges in winning the younger, Hispanic and female voters it needs to reclaim the White House. But if Republicans remain in a political hole, tonight’s midterms suggest that they have at least stopped digging. That’s 2014’s most important lesson for the presidential race that’s about to begin.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.