BOSTON (AP) — Attorney General Maura Healey won the Democratic primary for Massachusetts governor on Tuesday, bringing her one step closer to becoming the first openly gay candidate and first woman elected to the state’s top political office — eight years after she was elected the nation’s first openly gay attorney general.

Healey, whose only rival for the nomination dropped out of the race but remained on the ballot, will be the heavy favorite in November against the winner of the Republican primary. Former state Rep. Geoff Diehl, who was endorsed by former President Donald Trump, and businessman Chris Doughty, who is considered more moderate, are running for the GOP nomination.

The current officeholder, centrist Republican Gov. Charlie Baker, decided against seeking a third term. He did not endorse either Republican candidate.

The 51-year-old Healey has touted her efforts as the state’s top law enforcement official to protect students and homeowners from predatory lenders. Healey also sued Exxon Mobil Corp. over whether the oil giant misled investors and the public about its knowledge of climate change — a case still winding its way through the courts — and targeted OxyContin maker Purdue Pharma and members of the Sackler family over allegations they deceived patients and doctors about the risks of opioids. In 2021, Healey announced a resolution to that case.

Her most frequent target, however, was Trump. Healey led or joined scores of lawsuits against Trump while he was president. One of her first challenged Trump’s travel ban, which would have barred teachers and students from seven majority-Muslim countries, including Iran, Iraq and Syria, from coming to Massachusetts, which attracts students from around the world.

Republican voters in the state on Tuesday will become just the latest to decide whether the party will further embrace Trumpism or is ready to move back toward the center. In recent primaries in other blue states like Maryland and Connecticut, GOP voters have nominated Trump loyalists, hurting the party’s chances of winning against a Democrat in the November general election.

Voting in the Cape Cod town of Barnstable was extended until midnight after a mechanical issue with the town clerk’s vault blocked the clerk from getting access to ballots, delaying the delivery of ballots to polling locations.

Diehl, the favorite among state Republican Party delegates in Massachusetts, has ties to Trump stretching to 2016, when he served as co-chair for Trump’s presidential campaign in the state. Trump lost Massachusetts by almost 30 percentage points in his two presidential campaigns. Diehl has also opposed COVID-19 protocols and hailed the Supreme Court ruling overturning Roe v. Wade.

Doughty, a businessman, said he supported some of Trump’s initiatives but wants to focus on challenges facing Massachusetts, which he said is increasingly unaffordable.

Diehl has come to embrace Trump’s false claims that he won the 2020 election. Diehl said last year that he didn’t think it was a “stolen election” but later said the election was rigged, despite dozens of courts, local officials and Trump’s own attorney general saying the vote was legitimate. Doughty, meanwhile, has said he believes President Joe Biden was legitimately elected.

The challenge for both is that support of Trump may play well among the party’s conservative wing but could be a political albatross in a state where registered Republicans make up less than 10% of the electorate compared to about 31% for Democrats and about 57% for independents.

Diehl faced a similar struggle when he challenged Democratic U.S. Sen. Elizabeth Warren in 2018. He won a three-way Republican primary only to capture just over a third of the vote in the general election.

Doughty said he would work to lower taxes and has said that although he considers himself “pro-life,” he accepts the state Supreme Court decision recognizing a right to abortion in Massachusetts.

Massachusetts has a history of electing fiscally conservative, socially moderate Republican governors — including former Govs. William Weld and Mitt Romney — to provide a check on overwhelming Democratic legislative majorities. Baker, another Republican in that mold, has remained popular in the state.

Healey is widely seen as a strong favorite to win the governor’s office, particularly if Diehl, the Trump-backed candidate, were to win. Healey said she would work to expand job training programs, make child care more affordable and modernize schools. Healey has also said she would protect “access to safe and legal abortion in Massachusetts” in the wake of the Supreme Court’s decision overturning Roe v. Wade.

But Healey does face an oddball hurdle in Massachusetts —the so-called curse of the attorney general. Since 1958, six former Massachusetts attorneys general have sought the governor’s office. All failed.

The state has previously had a female governor, though she was appointed to the position. Republican Jane Swift served as acting governor after Gov. Paul Cellucci stepped down in 2001 to become U.S. ambassador to Canada.

Tuesday’s election also features several statewide contested Democratic primaries, including for attorney general and secretary of the commonwealth.

Two Democrats are jockeying for the top law enforcement office: former Boston City Councilor Andrea Campbell and workers’ rights attorney Shannon Liss-Riordan. A week before the election, a third candidate, former assistant attorney general Quentin Palfrey, announced he was suspending his campaign and endorsed Campbell; he will remain on the ballot.

Campbell would be the first Black woman to hold the office in Massachusetts if elected.

The winner will face Republican Jay McMahon, a trial attorney who previously ran against Healey and lost.

Incumbent Democratic Secretary of the Commonwealth William Galvin is vying for an eighth term in office. He’s fielding a challenge from fellow Democrat Tanisha Sullivan, president of the Boston branch of the NAACP. Sullivan would be the first Black person to serve in that post in the state.

The winner will face Republican Rayla Campbell in November. Campbell is also Black.

There are also contested races in the Democratic primary for auditor and for the Democratic and Republican races for lieutenant governor.

None of the state’s nine incumbent Democratic U.S. House members is facing primary challengers. There are two contested Republican primaries in the 8th and 9th congressional districts.

(Copyright (c) 2024 Sunbeam Television. The Associated Press contributed to this report. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox