BOSTON (SHNS) – The next person who will fulfill the job duties of the attorney general, at least for a couple of weeks, might not be the one who wins the election.

If she can succeed where several of her predecessors have fallen short and top Republican Geoff Diehl in the race for governor, Attorney General Maura Healey would get sworn into her new role around noon on Jan. 5. And under the timelines laid out in the state Constitution, the next attorney general will take office on Jan. 18, nearly two weeks later when the secretary of state, treasurer, and the auditor will also be sworn in.

A spokesperson for Healey’s campaign said if the Democrat emerges victorious for governor — an outcome Diehl is working hard to prevent — she intends to resign as attorney general. Healey does not plan to hold both positions for that 13-day span nor collect both salaries, the spokesperson said.

If that hypothetical scenario becomes a reality, most stakeholders agree that the top law enforcement responsibilities would fall for a brief period to one of Healey’s current top deputies: First Assistant Attorney General Kate Cook.

Both Healey’s campaign and office staff said they believe Cook would take over on an interim basis until the winner of November’s election comes on board, pointing to a section of state law declaring that “in the event of a vacancy in the office of the attorney general, the first assistant attorney general shall be continued in office and shall perform all statutory duties of the attorney general until an attorney general is duly qualified.”

That’s also the read on the situation held by top Senate Democrats and at least one of the candidates in line to succeed Healey.

Describing a question about the chain of events if Healey wins as “asking me what’s going to happen if my worst nightmare comes to fruition,” Republican attorney general nominee Jay McMahon said he also believes the office’s top deputy will keep the ship on the course between the gubernatorial and AG inaugurations.

“She will be the governor, if she makes it and she wins,” McMahon, who unsuccessfully challenged Healey when she won reelection in 2018, told the News Service. “It’s my understanding she’ll probably defer to her first assistant attorney general to actually run the office.”

Democrat nominee Andrea Campbell’s campaign did not respond to a News Service request for comment, nor did the office of House Speaker Ron Mariano.

Cook has served as first assistant AG since January after Healey appointed her in November 2021. Before she joined the office, Cook was a partner at Boston law firm Sugarman, Rogers, Barshak & Cohen P.C., where she led its government law and election law practice groups. She also has the extensive public-sector experience, previously serving as chief legal counsel to former Gov. Deval Patrick and as general counsel for the Senate Ways and Means Committee.

“The Attorney General’s Office is an advocate and resource for the people in so many critical ways, and I am thrilled to join this talented team in service to the people of Massachusetts,” Cook said in a statement when Healey announced the appointment.

However manageable or temporary, the calendar kerfuffle that might play out does not have much precedent, especially not when you consider the well-documented trend — or as some call it, “curse” — of Bay State attorneys general falling short in bids for higher office.

The last Massachusetts governor who had previously served as attorney general was Democrat Paul Dever, but he did not win the corner office while holding down the AG job. Dever served as attorney general from 1935 until 1941, lost the 1940 governor’s race, and then won on his second attempt in 1948.

To find the last time a sitting attorney general was elected governor, you have to go all the way back to the Whig Party’s John H. Clifford, who won the top race in 1852. That’s not exactly much of a parallel, either: at that point in the Bay State’s history, gubernatorial terms lasted for a single year and attorneys general were appointed by the governor, not elected by the people.

More recent history is dotted with attorneys general who all failed in their bids to parlay service as the top elected law enforcement official in Massachusetts to the top of the ballot, including Martha Coakley in 2014, Tom Reilly in 2006, Scott Harshbarger in 1998, Frank Bellotti in 1990 and Bob Quinn in 1974.

Quinn took a unique route to the attorney general’s office. A former state representative, he won the election as House speaker in 1967. Two years later, then-Attorney General Elliot Richardson resigned to take a job in the Nixon administration, and Quinn secured the approval of his colleagues to take over as attorney general before winning a full term in 1970.