Republican Charlie Baker held a slim but apparently decisive lead over Democrat Martha Coakley in a razor-thin race for governor early Wednesday morning, culminating the tightest general election in modern Massachusetts politics.
With 99 percent of precincts reporting, Baker was leading Coakley 48.4 percent to 46.6 percent, with about 40,000 votes separating the two.
Baker addressed campaign supporters around 1:30 am, sounding optimistic but saying he would agree to Coakley’s request to wait overnight for a final vote tally. “Tonight the voters said yes. . . . But we’ll wait to see what happens in the morning,” Baker said.
Earlier, the Associated Press and three national networks — ABC, CBS, and FOX News — projected Baker the winner.
The tight race was a surprise given that many polls had shown Baker ahead, but that was before a flurry of activity and accusations in the final week of the campaign.
The margin separating them did not appear narrow enough to trigger a quick recount.
Just after midnight, Coakley’s running mate, Steve Kerrigan, addressed the Democratic crowd at the Fairmont Copley Plaza, telling them that, “Folks, it’s going to be a long night, or rather a long morning.”
Coakley strategist Doug Rubin said the campaign was not ready to concede.
“We believe it’s within 1 percent and there are still votes that haven’t been counted,” Rubin said. “We feel strongly that we should see all the votes counted before we make any decisions.”
He added, “We believe it’s close enough, voters came out in large numbers, and we should honor that.”
Later, as Baker spoke, Rubin said that Coakley had called Baker to request the extra time.
“They had a good conversation,” Rubin said. “He was extremely gracious about it. We will get to the morning and see where we are.”
While the governor’s race remained without a concession, Democrats held on to four other statewide offices — attorney general, treasurer, secretary of state, and auditor.
Maura Healey’s victory over Republican John Miller in the attorney general’s race immediately inaugurated her as a rising star and a representative of the new generation of leaders in the state Democratic Party. A onetime professional basketball player and former assistant attorney general, she will be the first openly gay attorney general in the country.
In the treasurer’s race, Deborah Goldberg, an heir to the Stop & Shop fortune and former Brookline selectman, cruised past Republican Michael J. Heffernan, a Wellesley business executive who had no previous political experience.
Democrat William F. Galvin won his sixth term as secretary of state, easily defeating Republican David D’Arcangelo, a former Malden city councilor. Democrat Suzanne M. Bump won a second term as state auditor, defeating Republican Patricia Saint Aubin, a former brokerage manager from Norfolk.
A Baker victory for governor would mark a significant comeback for the state Republican Party, which had dwindled to near-irrelevance since Governor Deval Patrick’s 2006 win. The party would become a more powerful force to influence state policy, though it will remain a distinct minority in the Democrat-controlled Legislature.
Baker’s victory would be also be a blow to Patrick, his bitter rival from four years ago. The governor, who resented Baker’s attack on him from 2010, campaigned energetically for Coakley and zealously attacked the GOP candidate on her behalf, accusing him of “an authenticity problem.” But Patrick’s problems in managing state agencies made easy fodder for Baker to counter those attacks.
A Coakley victory would represent a remarkable comeback for a political figure who suffered one of the most infamous defeats in recent years and became the subject of national jokes when she lost to Scott Brown in the race for the US Senate seat long held by Edward M. Kennedy. A Coakley loss could mean that, despite a successful career as a prosecutor and two-term attorney general, she would be remembered bitterly as the Democrat who dragged her party into two of the highest-profile losses in recent state history.
Coakley largely embraced Patrick’s agenda and vowed to expand early education programs, increase mental health services, and target economic development funds to struggling mid-size cities. But she promoted those policies without the charisma that helped Patrick and Elizabeth Warren energize a widespread grass-roots movement.
Baker was hoping to persuade voters in overwhelmingly Democratic Massachusetts that he would apply conservative fiscal policies with compassion.
He also vowed to bring superior managerial skills after Patrick’s second term was marred by a litany of problems with the state child welfare agency, unemployment system, medical marijuana licensing, and by the costly failure of the state health care website, once a national model.
He pointed to his experience in the Republican administrations and his turnaround of Harvard Pilgrim Health Care as evidence of his management acumen.
Like Baker after his defeat in 2010, Coakley came into the race looking to reinvent herself, after her embarrassing loss to Brown.
Criticized as aloof and stiff in that race, she rejiggered her approach, shaking hands in diners and speaking more openly about her personal life, including her brother’s suicide.
Coakley, despite many years in elected office, was fighting to consolidate broad support among both senior Democratic figures and rank-and-file elected officials.
Many resented her prosecutions of Democratic officeholders and either publicly or quietly backed Baker.
Baker and outside GOP groups also raised and spent significantly more money than Coakley and her forces, thanks in part to strong financial support from the Republican Governors Association and a separate super PAC financed by wealthy Massachusetts Republicans.
That financial advantage allowed him to maintain a heavier presence on the airwaves.
Perhaps most importantly, Baker retooled his personal political profile, which he badly damaged when he made an awkward attempt to tap into the Tea Party-infused anger that was roiling during his 2010 campaign for governor.
This time around, he jettisoned his call for sweeping tax cuts and public employee layoffs and refused to sign a no-new-taxes pledge.
He also conveyed a warmer personal image. In his ads and campaign stops, he often appeared with his teenage daughter and his wife, Lauren, who vouched for his credentials as a sensitive family man and who declared that he would eschew the national GOP’s opposition to abortion rights, gay marriage, and insurance coverage for contraceptives.
In another strategic shift from four years ago, Baker courted Democrats, union leaders, and urban voters — peeling off some but also sending a signal to the broader electorate that he would not be a divisive conservative governor. He had ignored those constituencies in 2010.
At the same, he kept the small but vocal minority of conservative Republicans in his camp, by promising to curb welfare abuses, cut some taxes, and consider imposing time limits on public housing benefits. His running mate, Karyn Polito, a former state representative who courted the Tea Party in the past, helped him bridge differences with the right flank of his party.
Coakley relentlessly attacked Baker, casting him as a high-salaried chief executive who cut jobs at his health insurance firm and outsourced work to India. She argued that, as governor, Baker would be more interested in balancing budgets than helping the poor and the struggling middle class.
The three independent candidates barely registered with voters, the exception being Evan Falchuk, a former health care executive from Newton who self-funded most of his campaign with nearly $1.5 million.
He appeared to be getting just over 3 percent of the vote — a hurdle that would give his United Independent Party legal status in the next elections. Jeffrey McCormick, a Boston venture capitalist and conservative Christian preacher Scott Lively both appeared to be getting less than 1 percent.
Eric Moskowitz, Akilah Johnson and Martin Finucane of the Globe staff contributed to this report.