Charlie Baker is an anomaly: A Republican governor in a deep blue state, a favorite for re-election in a cycle favoring Democrats and a popular GOP figure in a region where President Trump has no coattails.

Yet the Massachusetts governor is showing that Republicans can survive – and thrive – in Democratic strongholds, in part by carving a moderate agenda and studiously avoiding the national political circus.

“Governor Baker is widely and correctly perceived as a steady, competent manager of the state's affairs, and by nature one of the least polarizing figures in politics,” said Bill Nancarrow, a history professor at Curry College in Milton, Mass.

By one measure, Baker is the most popular governor in the country -- with Morning Consult’s rankings showing Baker enjoying support from two-thirds of state residents. That his popularity has held is notable. The incumbent won in 2014 amid a Republican wave, but his re-election bid comes as Trump doesn’t even have the support of one-third of Massachusetts voters.

“If the state is being run effectively, voters aren't going to care about President Trump, as he’s not running the state,” said Nancarrow, who teaches a course, “America Divided: The 2018 Midterm Elections.”

'If the state is being run effectively, voters aren't going to care about President Trump.' — Bill Nancarrow, professor at Curry College

Baker, running with Lt. Gov. Karyn Polito, leads both Democrats competing in the September primary by double-digits, according to a WBUR poll this month.

“Governor Baker and Lt. Governor Polito are grateful for the support of Republicans, Democrats and independents from across the commonwealth who believe in their bipartisan record of delivering results for the people of Massachusetts, from nationally-recognized efforts to battle the opioid crisis, to making state government more accountable and efficient and holding the line against tax increases,” Baker campaign spokesman Terry MacCormack told Fox News.

CONNECTICUT GOP GOV CANDIDATE RUNS ON TRUMPIAN PLATFORM

Baker faces some challenges, however.

A conservative primary challenger, the Rev. Scott Lively, won almost 28 percent of delegates at the state Republican convention in April—well over the minimum 15 percent needed to qualify for ballot access for the Sept. 4 primary.

Lively, who ran as an independent in 2014 and has a history of controversial anti-gay comments, is running as a pro-Trump candidate against a governor who didn’t endorse the president in 2016. He calls Baker a “RINO,” a common pejorative acronym for Republican-in-name-only. Lively also has sued the Massachusetts GOP for $7 million, accusing the party of violating its neutrality rules in the primary. He amended the lawsuit on June 11 to focus on the charge of conspiracy.

Those RINO allegations may be doing nominal damage. Baker is slightly more popular with independents and even Democrats than with Republicans.

And the governor is clearly mindful of how Trump administration policies might reflect on his own. This week, he canceled a National Guard deployment to the border amid the backlash over the Trump administration’s policies separating illegal immigrant families (which Trump has since reversed).

Democratic candidate Jay Gonzalez, secretary of administration and finance under Gov. Deval Patrick, has ridiculed the governor over the dynamic with the sitting president.

“Baker hides behind the chaos Trump creates. He hopes we’ll lower our expectations and simply be grateful he isn’t crazy like our president,” Gonzalez told Democratic state convention delegates earlier this month. “Well, Charlie, you can’t hide from us. We are pulling back the curtain on your failed leadership. We expect more from our governor. Not being crazy is not good enough.”

Gonzalez won the party’s endorsement at the convention, carrying 70 percent of the delegates to rival Bob Massie’s 30 percent, ensuring a Democratic primary.

Baker’s campaign finance form, made public this month, said his campaign is ready to spend up to $9 million in the primary against Lively, who like Gonzalez and Massie agreed to the state’s $1.5 million primary spending cap to access $750,000 in public financing. Baker reportedly has $8 million on hand, and Lively has $13,000.

On the Democratic side, Gonzalez has about $172,000 in the bank, while environmental activist Massie has about $24,000.

In terms of achievements, the Baker campaign points to increasing the state’s Earned Income Tax Credit, overseeing reforms to the state’s public transit system for more efficiency, and proposing bills to cut the sales tax and rein in state employee benefits. His plan to combat opioid abuse became a national model, and Baker also participated in the president’s commission to fight opioid abuse.

Similar to previous Massachusetts Republican governors such as Bill Weld and Mitt Romney, Baker is more liberal on social issues.

He supports abortion rights and same-sex marriage and earlier this year joined several Democratic governors in Connecticut, Delaware, New York, New Jersey, Rhode Island and Puerto Rico to push gun control. Baker also opposed Trump on exiting the Paris climate treaty. This has irked some on the right, such as a conservative group called the Massachusetts Republican Assembly, whose members signed a “Declaration of Independence” from Baker.

Still, it is highly unlikely this will affect his re-election bid, said Joshua Dyck, political science professor at the University of Massachusetts, Lowell.

“He acts more like a Republican on cutting the budget and cutting taxes,” Dyck told Fox News. “He has been mostly silent on Trump’s very controversial issues. I don’t think he is worried about Scott Lively. He is loved in this state. It is going to be a walk in the primary and in November.”

Fred Lucas is the White House correspondent for the Daily Signal.