Barack Obama’s two victories created the impression of a strong wind at the back of the Democratic Party. Its constituencies — the young, the nonwhite, the college educated — were not only growing but were also voting in increasing numbers. The age-old issue of voter turnout finally seemed to be helping the political left.

The longer view is starting to look quite different, however. None of the other three most recent Democratic presidential nominees — Hillary Clinton, John Kerry and Al Gore — inspired great turnout. George W. Bush, as you may recall, was widely considered to have won the political ground game. In off-year elections, Democratic turnout is even spottier, which helps explain the Republican dominance of Congress, governor’s mansions and state legislatures.

Since Donald Trump’s shocking victory, much of the political diagnosis has focused on white working-class swing voters, and for good reason. Across the industrial Midwest, white voters who had supported Obama and previous Democrats abandoned the party for Trump.

The role that turnout played has been harder to figure out. In the initial days after the election, some people focused on the total number of votes cast, which appeared much lower than four years ago. That impression was wrong, though, because a few million absentee and mail ballots had not yet been counted out West. In the end, overall turnout in 2016 won’t have changed much from 2012.

Yet it’s also becoming clear that turnout really was an important part of the 2016 story — and addressing it is crucial to the Democrats’ comeback plans.

In the simplest terms, Republican turnout seems to have surged this year, while Democratic turnout stagnated. The Republican surge is easiest to see in those same heartland states that flipped the election.

Douglas Rivers, the chief scientist at YouGov, a research firm, has done an analysis focused on the returns in six states — five that switched from Obama to Trump, and Minnesota, which Trump barely lost. In these states, turnout rose more in conservative areas than in liberal ones. That pattern, obviously, cannot be explained by vote-switching among the white working class.

In counties where Trump won at least 70 percent of the vote, the number of votes cast rose 2.9 percent versus 2012. Trump’s pugnacious message evidently stirred people who hadn’t voted in the past. By comparison, in counties where Clinton won at least 70 percent, the vote count was 1.7 percent lower this year.

Pennsylvania is a good example. The state’s southern strip stretches from distant suburbs of Pittsburgh through the Appalachian Mountains and Interstate 76, ending in Lancaster County, not far from Philadelphia. It’s solidly Republican territory, even in a normal year.

This year, the number of votes cast in the counties along that strip rose almost 10 percent relative to 2012. In Pennsylvania’s big cities and the labor union stronghold of Allentown, the vote count rose only a few percent.

In addition to analyzing these publicly available numbers, YouGov has also conducted polling that points in the same direction. For every one voter nationwide who reported having voted for Obama in 2012 and Trump in 2016, at least five people voted for Trump after not having voted four years ago. Clinton attracted substantially fewer 2012 nonvoters, the data show. On net, Trump’s gains among nonvoters mattered more than his gains from vote switchers, Rivers says.

One of the sillier aspects of postelection analysis is the notion that any one factor determined the result, and I want to be clear that I’m not suggesting as much. Still, the swing of white working-class voters was undeniably crucial. To that point, Craig Gilbert, of The Milwaukee Journal-Sentinel, has noted that large swaths of Wisconsin have now been carried by Obama, Trump, Republican governor Scott Walker and Democratic Senator Tammy Baldwin.

The turnout contrast also doesn’t answer how influential was James Comey’s misguided October letter about Clinton’s email. Her campaign believes it depressed her turnout and lifted Trump’s, and it may well have.

Either way, though, turnout is a problem for Democrats that will persist long after this election. Many strong Democratic constituencies — like young voters, Latinos and Asian-Americans — have relatively low turnout rates. African-American turnout has trailed white turnout when Obama was not on the ballot.

Obama, for his part, has long had a minor obsession with the Democrats’ popularity among nonvoters. “Hopefully, it’s a reminder that elections matter and voting counts,” he said after Trump’s win. “I don’t know how many times we have to relearn this lesson, because we ended up having 43 percent of the country not voting who were eligible to vote.”

What can the party do about it?

For starters, it should continue to fight hard for voting rights. Doing so puts it on the right side of history and also helps the party tactically. There is a reason that Republican officials have been trying to restrict voting hours and eligibility: Many of them are afraid of high turnout. The Republicans’ new political dominance will make the fight harder, but it must continue.

Second, the Democrats should recommit themselves to old-fashioned organizing without giving up on the emerging science of voter turnout. Academic researchers have learned a lot in the last decade about voter behavior and turnout tactics. There is much more to learn, as this year’s disappointment makes clear. The ubiquity of social media and smartphones creates opportunities to get more people to vote.

Finally, the Democrats should remember that inspiring turnout and persuading swing voters aren’t separate problems. It’s a lot easier to do both with a galvanizing message that makes voters feel part of a larger project — be it an uplifting project or a combative one.

The Democratic Party still has many of the same long-term strengths that it did two weeks ago. Its constituencies are growing, and the Republican Party, for all of its power, is filled with contradictions. But Democrats need to reach both their new constituencies and their old, working-class base — and then make sure that people who agree with the party on the issues actually get out to vote.