When Martha Coakley was defeated by a surging Scott Brown in the 2010 US Senate race, Democrats used the loss as a rallying cry of sorts. Never again, they vowed, would the party's vaunted grass-roots organization be caught flat-footed.
The painful memories of her defeat fueled a relentless door-to-door effort 10 months later, to reelect Governor Deval Patrick and then to oust Brown and elect Elizabeth Warren to the Senate in 2012.
Now, with Coakley trailing Republican Charlie Baker in most polls, Democrats are turning to that revived get-out-the-vote operation with a sense of urgency to see if — this time — it is strong enough to push Coakley over the victory line.
In public appearances in the past week, Coakley and her allies have tried to shift the focus away from the souring polls and Baker newspaper endorsements and toward the need for a robust turnout on Tuesday.
In a press release issued minutes after the Globe published its endorsement of Baker last Sunday, the Coakley campaign said it had "breaking" news: 2,631 volunteers had knocked on 72,254 doors and made 63,836 phone calls that weekend, surpassing the campaign's goals.
"It's the ground game that will keep us in this," said state Senator Benjamin B. Downing, the point man in charge of the party's voter mobilization effort. "And it is the ground game that is, and will be, the reason we win this race."
Massachusetts remains an overwhelmingly Democratic state — a built-in advantage for any Democrat running for statewide office.
The challenge, Democrats said, will be energizing voters who historically skip midterm elections: young people, African-Americans, Latinos, and women not enrolled in either party, whom one operative called "the real battleground demographic."
The party will also have to energize volunteers to knock on doors and make phone calls for a candidate who has struggled to generate the same level of enthusiasm as Patrick and Warren did in their campaigns.
That task has been complicated by former mayor Thomas M. Menino's death on Thursday, which forced the Coakley (and Baker) campaigns to temporarily freeze their activities and which cast a shadow over the contest in its closing days.
Secretary of State William F. Galvin, the state's top elections official, said the four ballot initiatives being considered Tuesday — which appeal to an ideologically diverse array of voters — appear to be generating more excitement than the race between Coakley and Baker.
"There's no cult for either candidate," Galvin said. "Up till now, the enthusiasm, and the interest, has been driven by the ballot questions."
In the past year, Baker has been making an unprecedented effort to blunt the traditional Democratic advantage in getting out the vote. His campaign said more than 3,600 volunteers had either "checked in" at one of the party's "victory offices" across the state or made contact through the campaign's mobile phone application.
"We are focused on our own grass-roots effort, the first of its kind in Massachusetts for data and investment," said Baker's campaign manager, Jim Conroy. "We've been well at it for over a year and we are breaking every record for voter contact that any Republican campaign in Massachusetts has ever achieved."
Democrats express confidence in their operation and said that, unlike in the 2010 Senate race, they have been methodically building a volunteer corps for months.
The number of volunteers, phone calls, and doors knocked on by Coakley's campaign are about equal to the numbers that Patrick's campaign had at this point in his reelection fight against Baker in 2010, said John Walsh, a former party chairman credited with helping to revive the Democratic machine after Coakley's loss.
"If this were 2010, it would have been only two weeks ago that we woke the hell up and said, 'Oh, we've got a race,' " Walsh said, referring to the belated push for Coakley in her Senate race.
Democrats have targeted efforts on midsized cities such as Brockton and Fitchburg and on college campuses, reminding independents and Democrats who cast ballots for President Obama but skipped past midterm races to vote on Tuesday.
"We believe a lot of this fight is going to be in the gateway cities," said Doug Rubin, Coakley's chief strategist. "There is an opportunity for higher turnout in those areas. That, in particular, is going to be an important indicator of how things go on Election Day."
At the same time, Democrats are working to drive up their traditional advantage in liberal strongholds such as Brookline, Cambridge, and Newton. Last week, for example, Patrick and Donald Berwick, a liberal favorite who placed third in the September Democratic primary, held a rally in Concord.
Labor leaders are making their own push to avoid a repeat of the 2010 Senate race, when 49 percent of union members voted for Brown compared with 46 percent for Coakley, labor's endorsed candidate, according to a post-election poll done by the AFL-CIO.
Steve Tolman, president of the state AFL-CIO, said labor sent 1,000 members to call and knock on the doors of fellow union members last weekend.
But he acknowledged unions are facing a challenge after a Democratic primary in which their leaders were evenly split between Coakley and her chief rival, Steve Grossman.
"Candidly, we've got a little work to do," he said. "We've got a little setback because you're not unified prior to the primary, but we're in full swing now."
Down-ballot campaigns are trying to help. Maura Healey's campaign for attorney general, confident in its prospects against Republican John Miller, has given over its volunteers to the Coakley campaign.
The Coakley campaign stands to benefit from a union-backed effort to pass Question 4, a ballot initiative that would guarantee paid sick time for workers. Raise Up Massachusetts, the group backing the ballot question, said it has either called or knocked on the doors of 600,000 voters and expects to contact 1 million by Tuesday.
It is targeting young women and low-income voters in urban areas — groups the Coakley campaign is also trying to drive to the polls.
"We're Democrats, so there's always somebody panicking about something," Walsh said, "but there's a sense of resolution about this; there's a sense of determination."
Michael Levenson can be reached at email@example.com.