With much speculation swirling about next year’s gubernatorial race, some of it was put to bed Wednesday with a joint statement from Gov. Charlie Baker and Lt. Gov. Karyn Polito. The governor and the lieutenant governor announced their intent to exit after two terms, saying neither will run for the state’s highest executive seat.

Gov. Charlie Baker, Lt. Gov. Karyn Polito, won't seek third terms, creating a wide-open race

Given Gov. Baker’s frequent status among the most popular governors in the country during his tenure, this means one of the heaviest hitters will be sitting out the fight for the governor’s seat next year. Now, the remaining speculation intensifies on two potential candidates who have yet to officially announce their intentions: Attorney General Maura Healey and U.S. Labor Secretary Marty Walsh. Between Ms. Healey’s strong statewide profile in the AG’s Office and Mr. Walsh’s experience as Boston mayor, both would jump into the race with a strong foothold — not to mention their respective multimillion-dollar war chests.

Even if only one of them ultimately jumps in, it likely would take up much of the oxygen in a Democratic gubernatorial primary in which three others have officially announced their intentions but so far failed to get much traction: Harvard professor Danielle Allen, former Pittsfield state Sen. Ben Downing and Boston state Sen. Sonia Chang-Diaz. If both Ms. Healey and Mr. Walsh enter the contest, it would be even more of an uphill race for those three candidates.

On the other side of the aisle, Gov. Baker’s exit will clear the lane for former state legislator Geoff Diehl’s pursuit of the Republican gubernatorial nomination. While other Republicans have declared a run or expressed interest, Mr. Diehl wields a powerful advantage: former president Donald Trump’s endorsement.

Through a popular and largely effective term of service, Gov. Baker positioned himself as one of the nation’s prominent reasonable Republicans who have resisted the extremism and fanaticism of the Trump wing. As the top Republican politico in Massachusetts state government, Gov. Baker has been slammed more by his own party — from Mr. Trump to Massachusetts GOP Chairman Jim Lyons — than by Democrats.

The Baker administration fits neatly into the history of Republican governors working effectively within the Bay State’s deep-blue political landscape. Given the current leadership of the Massachusetts GOP, that moderate Republican legacy appears threatened, even if the Trump-tapped Mr. Diehl loses to a Democrat in 2022. This fight for the soul of the Republican Party in Massachusetts matters, and it should matter even to ardent Democrats. Whether one agrees with all of his stances and policies — and a dip in poll numbers during the initial COVID vaccine rollout indicated an understandable chill — Gov. Baker modeled leadership that’s admirable as it is rare among politicians: He not only worked across the aisle, as any Republican must do in Massachusetts, but he adamantly and publicly pushed back against his own party when it misstepped on critical matters that shouldn’t be captured by politics. He railed against Trumpian demagoguery even as much of his party embraced it and trashed him for not adopting it. He gave no quarter to the inane electoral conspiracies of Mr. Trump’s “big lie.” He never flirted with the dangerous anti-vaccine and COVID-skeptical culture warring practiced by too many of his GOP peers.

It is sad that the current political climate sets the bar so low for political courage. Nevertheless, it’s worth noting when someone models that courage by prioritizing doing what is best for constituents over moving in partisan lockstep. Gov. Baker and Lt. Gov. Polito invoked that ethos in announcing their reasons for not running in 2022: “We have a great deal of work to do to put the pandemic behind us, keep our kids in school, and keep our communities and economy moving forward,” they said in their joint statement. “We want to focus on recovery, not on the grudge matches political campaigns can devolve into.”

We hope that’s the kind of leadership Massachusetts gets in its next governor as well, whoever that turns out to be.