THE SPLIT PERSONALITY of the Republican Party in Massachusetts didn’t fare well in this year’s election, losing a handful of additional offices and continuing its slide to near-total irrelevance.

Republicans lost two seats they previously held in the House, held on to their seats in the Senate, and watched as the district attorney’s office for the Cape and Islands and the sheriff jobs in Barnstable and Bristol counties shifted to Democratic control.

Gov. Charlie Baker, who represents the moderate wing of the Republican Party, decided not to run for a third term, which opened the door for Maura Healey and Kim Driscoll to move in to the corner office.

More importantly, however, Baker’s absence from the ballot created an identity crisis for state Republicans, whose state party apparatus steered hard to the right as its moderate leader prepared to exit the political stage.

Jim Lyons, the chair of the Massachusetts Republican Party, believed that conservatives needed to stand by their principles no matter what it cost them at the polls. He learned the hard way on Tuesday that Massachusetts voters were not going where his Trump-loving Republican Party was going.

“Thank you to our candidates, our campaign volunteers, our donors, and our staff,” he said in a tweet. “We fought together for Life, Liberty, and the American Dream. We gave it our all, but Massachusetts voters sadly decided to go in a different direction.”

Baker tried to turn back the tide, both personally through scattered endorsements and also through his fundraising for the Massachusetts Majority super PAC, which tends to support centrist Democrats and Republicans. But his efforts had mixed success.

The Massachusetts Majority super PAC spent nearly $1.7 million in the runup to the general election on behalf of 38 candidates – 30 Republicans, six Democrats, one Independent, and one Unenrolled. Twenty-four of the candidates, including all six Democrats, won their races and 13 of the candidates lost. One race was too close to call.

The super PAC supported many of the Republican incumbents in the Legislature who were facing challenges, and most of them managed to hang on to their jobs.

A handful of Republicans running for open seats appeared to eke out narrow victories. Republican Andrew Shepherd of Lunenberg was leading Democrat Margaret Scarsdale of Pepperell by 34 votes in the race for a House seat previously held by a Republican. Republican Marcus Vaughn of Wrentham edged out Democrat Kevin Kalkut of Norfolk by 428 votes. And incumbent Republican Rep. Leonard Mirra of Georgetown edged out Democrat Kristen Kassner of Hamilton by 84 votes, while Republican Rep. David DeCoste of Norwell scored a narrow victory over Democrat Emmanuel Dockter of Hanover.

The bulk of the super PAC’s money went to support Republican candidates in a handful of high-profile races – Anthony Amore running against Sen. Diana DiZoglio for state auditor; Bristol County Sheriff Thomas Hodgson, facing a challenge from Attleboro Mayor Paul Heroux; and three Senate candidates – Rep. Shawn Dooley of Wrentham, William Johnson of Granby, and Edward Dombroski Jr.of Wakefield – running against incumbents or battling for an open seat.

All of those candidates lost, even though the super PAC money helped make the races competitive financially.

The problem, at least in some instances, was former president Donald Trump, who is not regarded favorably by most Massachusetts voters. Dooley and Amore tried to align themselves with Baker’s moderate style of politics, but they had difficulty explaining away their past support for Trump. One of the losing candidates, Hodgson, never backed away from Trump.

Gus Bickford, the chair of the Massachusetts Democratic Party, said he was puzzled by the Baker-affiliated super PAC’s support for Hodgson, which he said created confusion among voters who are fans of Baker. Speaking as if he was addressing Baker directly, Bickford said: “He’s not your brand. He stands for everything you’re against.”

Baker didn’t want to talk about the future of the state Republican Party on Wednesday. At a press conference with Healey and Driscoll to discuss the transition, Baker said he would put off any discussion of the party until after his term ends in January. But he did suggest money and support can only do so much for candidates.

“Elections are about the people on the ticket,” he said. “The voters have spoken.”