Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — In liberal "Taxachusetts," the land of Elizabeth Warren and the Kennedys, sits the nation's most popular governor, Charlie Baker. The twist? He's a Republican.

The runner-up, Gov. Larry Hogan, hails from Maryland, a state so blue it hasn't voted for a Republican president in decades and went nearly 2-to-1 for Hillary Clinton. Hogan is a Republican, too.

And in the "People's Republic of Vermont," the liberal utopia of Bernie Sanders, Ben & Jerry's and a disproportionate number of Birkenstock dealers, you'll find the country's fourth most popular governor, Phil Scott. He's also a Republican, winning handily on the same night Clinton trounced Donald Trump in the state.

The trio are anomalies — Republicans not just surviving, but thriving politically under President Donald Trump, and in the very bluest of states.

How do they do it?

By doing basically the opposite of whatever Trump does.

Where Trump likes to poke his finger in the eye of Democrats, these governors work across the aisle to get things done; where the president governs to his base, they embrace moderate and sometimes even liberal policies; and where Trump's instincts lead him to provoke and attack, they come across as reasonable and personally likable.

"They have tailored their policies to their state," said Michael Steele, former chairman of the Republican National Committee and ex-lieutenant governor of Maryland. "They've recognized what the true political landscape of their state is and have smartly decided to govern accordingly."

Unfortunately for the rest of the GOP, the very bespokeness that makes these governors so popular at home also makes it hard to apply their formulas anywhere else.

Governors, who are gathering this weekend in Washington for the annual winter meeting of the National Governors Association, are beneficiaries of the last bastion of ticket-splitting in American politics.

Insulated from the divisive politics of the nation's capital, close to their constituents, and tasked with solving problems that often don't lend themselves to partisan solutions, these governors have risen above the party machinery and ideological warfare that have bogged down others elsewhere.

This trio of blue-state Republicans consistently out-polls colleagues who are, at least on paper, more aligned with the politics of their states.

"With each of these governors, Hogan, Baker, and Scott, we've seen their numbers hardly move over time, with substantial support from Republicans, independents and Democrats," said Cameron Easley of Morning Consult, which polls all 50 governors and ranks their popularity several times a year.

One reason for their polling success is a shared inclination to stay out of the ugly national fray — which is why it's no surprise the three governors did not respond to requests for comment from NBC News.

Divided government in their statehouses has forced the three to work with Democrats to get things done, which voters find refreshing, while the weakness of the GOP has allowed them to disown Trump and break with party orthodoxy when necessary without worrying about a backlash from the right.

"Charlie Baker sets the agenda in Massachusetts," said Ryan Williams, a former spokesperson for Mitt Romney, the former Republican presidential nominee and governor of the same state. "He is able to divorce himself from the toxic brand of politics that members of Congress have to deal with in Washington every day and can be his own person."

Baker is up for re-election this year, and so far he has scared off top-tier challengers and is more popular than Warren, the state's popular Democratic senator.

And whatever effect Trump may have on his party's fortunes elsewhere, he may actually be helping these three Republicans by making it easy for them to look moderate by comparison.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Hogan, for instance, has seen his numbers soar even as Trump's sink in Maryland. He's racked up headlines that declare him "The Un-Trump Republican," even as Democrats holler that such coverage papers over more conservative parts of his record.

Democrats have their own examples of the phenomenon in Govs. Steve Bullock of Montana and John Bell Edwards of Louisiana, who both have enviable approval ratings in deeply conservative states.

"In a state like Montana, I begin with the assumption that we all share the same values, we all want the same things," Bullock told NBC News. "We've been able to get beyond where partisan barriers often exist and say what's right for our state."

A Dunkin' Donuts man in a Starbucks world

Massachusetts Gov. Charlie Baker gets a buzz cut during a fundraising drive at Granite Telecommunications in Quincy, Mass.on April 7, 2015. Elise Amendola / AP

In Massachusetts, Baker has supported laws to protect transgender people from discrimination and just earned the backing of the powerful Teamsters union, who had endorsed his Democratic opponent four years ago.

"Most of the quotes you see in the paper from Democrats about Charlie Baker are complimentary," said Steve Koczela, the president of the MassINC Polling Group. "He's popular, so people don't challenge him. Voters don't see negative quotes about him, so that makes him more popular, and so on."

Fiscally conservative, socially moderate and quietly competent, Baker presents himself as a Dunkin' Donuts man in a Starbucks world.

He ditched the ornate office traditionally used by governors, allows himself to be photographed getting his head shaved every year for charity, and, even by Massachusetts standards, is a superfan of the Red Sox and Patriots.

And important in a state that has often been a launching pad for an Oval Office bid (see: Romney, John F. Kennedy, Ted Kennedy, Michael Dukakis, John Kerry and maybe Warren?), Baker has shown no interest in national politics so far and generally stays off cable news.

"He's there for everybody," Eleanor Jones, a Democrat from Groton, told a pollster for WBUR last month. "I think he's going to be around for quite some time."

It helps, too, that the state's economy is booming, that Massachusetts Democrats keep getting sent to prison (the last three statehouse speakers were convicted of felonies), and that the state has a history of electing Republican governors to keep a check on the overwhelmingly Democratic legislature.

Bernie and the race car driver

Vermont Gov. Phil Scott waits to take his stock car out for a practice run at the Thunder Road race track in Barre, Vermont on July 6, 2017. Wilson Ring / AP

Phil Scott succeeded an unpopular Democrat who had held power for six years.

Thanks to Vermont's size (fewer than 700,000 people), its politics tend to be more personal and less partisan. It's a place where Bernie Sanders can be the country's most popular senator (according to Morning Consult) at the same time Scott, a Republican, is one the most popular governors.

He has charted a path few Republicans would recognize, but one that fits with his state, signing a bill to legalize marijuana and saying he's "changed completely" on guns after the recent school shooting in Parkland, Florida — a move that's especially notable given Vermont's well-known pro-gun policies.

Scott also has one big — and unique — advantage: Long before he entered politics, he was winning races.

"Phil's a really good race car driver who also just happens to be governor," joked Michael Stridsberg, a spokesperson for the Thunder Road Speedway outside Barre, Vermont. "He was one of the top racers in the state before he got into politics."

Scott, who has been behind the wheel of stock cars for over two decades and remains the winningest driver in the top division at Thunder Road, had a following long before his 2016 campaign. He's had to cut down on his racing since entering the governor's mansion, but still managed six starts last year.

Democrats seem to be at a loss as to how to take him on.

"People really like Phil Scott," state Sen. Dick McCormack said at a Democratic Party strategy meeting crashed by the newspaper Seven Days. "They really like his message and they don't like partisanship, and if we start pointing out this contradiction and that contradiction, we're the naysayers."

I like you but you're still fired

Maryland Gov. Larry Hogan on the Maryland House of Delegates chamber floor before delivering his annual State of the State address in Annapolis, Md. on Jan. 31, 2018. (AP Photo/Steve Ruark) Steve Ruark / AP

Still, no matter how much they run from Washington and their party, sometimes national politics catches up with even popular governors.

"Sometimes people just feel the need to send the message about national politics in their local election," said Colm O'Comartun, a former executive director of the Democratic Governors Association. "Often people remain popular, but nonetheless get beaten on Election Day."

That's exactly what happened to Bob Ehrlich, the state's last Republican governor before Hogan, who was thrown out of office during the 2006 Democratic wave even though more than half of Maryland voters approved of the job he was doing.

Hogan, who officially filed for re-election on Thursday, is hoping to avoid a repeat.

The governor had a 71 percent approval rating in a recent Gonzales Media and Research Services poll, but just 47 percent of respondents said they would vote for him in November.

That still puts him ahead of all challengers, but it shows that many voters — especially Democrats — want to replace him, even though they like him.

Steele, the former RNC chair who served as Ehrlich's lieutenant governor, recently reminded Hogan of the state's electoral history.

"Governor Hogan has not been asleep at the switch, he understands where he is," Steele said. "It's a reality for a Republican in Maryland."