A hard sprint still stands between the three Democrats who would be governor, and September’s gubernatorial primary. But all summer, as Martha Coakley, Steve Grossman, and Don Berwick have crisscrossed Massachusetts, the state’s Democratic Party has been rolling machinery into place to deploy in November’s general election.

Democratic officials attribute the party’s upswing over the past several years to a renewed focus on the type of grassroots organizing that swept Michael Dukakis into the governor’s office in the 1970s. An expansive Democratic ground game put Deval Patrick in the governor’s office twice. It propelled Elizabeth Warren past Scott Brown, and into the US Senate. Democrats blame Brown’s 2010 Senate victory over Coakley on an inattention to ground-level organizing.

At the same time, a robust ground game takes months to build. Warren’s campaign was organizing volunteers more than a year before Election Day. The Democratic candidate who emerges from September’s primary won’t have time to build the kind of ground organization Warren and Patrick deployed. So the state Democratic Party has spent the summer building a ground operation for its eventual nominee, with a focus on growing turnout in November.

“This race is going to be won on the doorsteps,” says John Walsh, the former state Democratic chairman, and a key figure in building the Patrick and Warren turnout machines. “We’re the bluest of blue states, but people forget we voted for Ronald Reagan, and that we had 16 straight years of Republican governors. I try to block that out, too. When there’s a credible candidate on the Republican side, the races are close. The ground game really makes all the difference in the world.”

State party canvassers have knocked on the doors of roughly 30,000 voters in dozens of communities, from Pittsfield to Cape Cod. The party specifically targeted Democrats who tend to vote in presidential elections, but don’t turn out in gubernatorial years — the types of voters who aren’t being called or door-knocked by the Democratic candidates facing off in September’s primary.

“We have 11 statewide candidates hitting the same universe of primary voters,” says Sen. Benjamin Downing, the chairman of the Democrats’ coordinated campaign effort. “Charlie Baker is focused on November 4. We don’t want our strength, our deep talent pool, to become a weakness in the short term. We want to grow the pool of likely Democratic voters in the fall.”

The focus on Democratic voters who don’t vote in gubernatorial elections is counter-intuitive. But it’s an extension of a get-out-the-vote gambit Warren employed two years ago. Warren’s campaign knocked on the doors of a group of Democrats who hadn’t voted in the previous six years, and succeeded in turning out scores of them on Election Day. “In any rational circumstances, you’d ignore them,” Walsh says. “You’d say they’re not worth the time. Warren put them on the list.”

Warren topped Brown by roughly 240,000 votes two years ago. A huge slice of Warren’s margin came from Democrats who had never voted before: The campaign turned out 100,000 voters who were on the Democratic rolls, but who had never voted. “At some point, they’d checked D, but they’d never followed through on Election Day,” Walsh says. “That’s why it’s so important to get on the ground and see them face to face. There’s a bunch of stuff that doesn’t work, like robocalls, or a fusillade of TV. It’s proven not to work. As soon as you’re dependent on robocalls and mail, you’re screwed. When you get people to talk to their friends, and supplement that with knocking on doors, nothing compares.”