Maryland Gov. Larry Hogan enters the House chamber before delivering his third State of the State address in Annapolis on Feb. 1. (Linda Davidson/The Washington Post)

Maryland Gov. Larry Hogan’s stratospheric approval rating has slipped in a Washington Post-University of Maryland poll for the first time since the Republican took office, while voter skepticism of President Trump and his party threatens to complicate the governor’s bid for reelection next year.

Yet Hogan’s support for reelection lags far behind his approval rating, with 41 percent of registered voters saying they would support him for a second term and 37 percent preferring a Democrat.

The margin has narrowed since September, when Hogan held a 46 to 30 percent edge over a generic Democrat. No Democratic candidate has entered the 2018 race so far, though several have said they are considering it.

The survey underscores Hogan’s challenge in satisfying a blue state electorate that vaulted him to an upset victory over then-Lt. Gov. Anthony G. Brown (D) in 2014 but that favored Hillary Clinton over Trump by 26 percentage points in November. Hogan’s decision not to endorse Trump earned him widespread support, but he has faced continued pressure this year to buck the 45th president and bend to residents’ liberal leanings on big issues in Washington and Annapolis.

“Even with such high approval ratings, he’s at risk of suffering from . . . what’s going on with the Republican Party,” said Michael Hanmer, an associate professor at the University of Maryland and research director of its Center for American Politics and Citizenship.

Hanmer said Hogan’s reelection is “going to depend on who the Democrats put forward and how much they can attach [Hogan] to what’s going on in national politics.”

Paul Walczyk, a self-described liberal Democrat who voted for Brown, says Hogan has won him over by breaking with his party to distance himself from Trump and vowing to fight to protect the polluted Chesapeake Bay. But he plans to keep a close eye on how the governor responds to the White House in coming months.

“If he continues to provide the kind of leadership he has and also comes out strongly against what the administration is doing on health care and immigration and other topics, I would obviously support him,” said Walczyk, a 53-year-old Bel Air resident who works in advertising. “If he doesn’t, it could severely impact my impression of him.”

Nearly 6 in 10 Democrats approve of Hogan, but much of that support is soft and can’t guarantee protection from an anti-Republican backlash at the polls in 2018.

Robert L. Ehrlich Jr., the state’s last Republican governor, maintained a 55 percent job-approval rating just weeks before he lost to Democrat Martin O’Malley in 2006, a year that showcased how Marylanders’ frustrations with the national GOP can undermine a popular governor’s standing.

Immigration provides a window into how perceptions of state and national politics can become intertwined.

By a 65 to 33 percent margin, the poll finds more Marylanders oppose than support Trump’s revised executive order to temporarily block travel from six Muslim-majority countries, exempting U.S. citizens and those who received visas before late January.

Hogan has resisted pressure to weigh in against the order, saying his focus is on Maryland issues. Nearly half of Maryland residents both oppose Trump’s executive order and say it is “absolutely necessary” that Hogan speak out against it.

Over 8 in 10 Republicans — 83 percent — support Trump’s order, although the number falls to 36 percent among independents and 13 percent among Democrats.

The poll finds that Marylanders are cool to local agencies cooperating with federal immigration authorities. A 56 percent majority doubts that increased local involvement in deportations would improve compliance with immigration laws, while three-quarters say it would make undocumented immigrants reluctant to inform police of crime.

But Hogan has vowed to veto what he called an “outrageously irresponsible” bill passed by the House of Delegates that would limit the ability of state and local officials to cooperate with federal immigration enforcement. The bill is awaiting action in the Senate.

Bob Bajefsky, a 75-year-old retired attorney from Potomac, is among the Democrats who consider Hogan a reasonable and not overly partisan governor. But he said he has been horrified by Trump’s behavior in office and would like to see Hogan stand up to the president and refuse to assist in rounding up immigrants.

“In today’s environment, with where the Republican Party is, I’m probably more strongly inclined toward Democrats than I’ve been in the past,” said Bajefsky, noting that he last voted for a GOP governor in 1966, when Spiro Agnew ran against a segregationist Democrat. “But it would depend on who is running against him.”

Hogan will probably have a formidable war chest. He had $5 million available for his reelection bid before the legislative session began in mid-January, about 18 months before the June 2018 gubernatorial primaries.

As governor, Hogan has pursued a moderate agenda focused on growing the economy and reducing regulations and fees, while steering clear of social issues such as abortion and gun rights.

Last week, he backed a ban on fracking, a position overwhelmingly favored by the state’s heavily Democratic electorate.

He also has proposed his own version of paid-sick-leave legislation, which would require that employers with 50 or more employees provide at least five days off, while offering tax credits to smaller businesses as an incentive for them to provide leave. He has threatened to veto more generous legislation working its way through the General Assembly, including a bill that would require businesses with 15 or more employees to provide five days.

In the poll, 84 percent of respondents favor requiring paid sick leave for businesses with at least 15 workers. There is also strong support for requiring businesses with 50 or more employees to offer the benefit, and 78 percent of respondents said they would support tax benefits for businesses with fewer than 50 workers that provide paid sick leave.

Hogan’s popularity outpaces that of the Maryland legislature and both major parties in the state. Residents give him the highest marks for his handling of the economy, with 6 in 10 approving. His approach to taxes and education had about half of residents in favor and a third disapproving, while approval for his response to the state’s heroin and opioid crisis climbed 12 percentage points in the last year, to 47 percent.

Elizabeth Ryan, a conservative Democrat and stay-at-home mom of two school-age daughters, backed Hogan in 2014 because she preferred his stances on education and transportation. His order for Maryland schools to start the year after Labor Day cemented her support ahead of his reelection bid.

“Everyone was always afraid to do it, and I don’t think they wanted to go up against the teachers or local school boards, but he just did it,” said Ryan, 56, who lives in Frederick County.

Ryan said she voted for Clinton in the presidential race and is reeling from Trump’s victory. But unlike other Democrats, she isn’t itching for Hogan to denounce the president. “It’s not going to change anything,” Ryan said. “He’s his own man, and he’s going to do what’s best for Maryland.”

Another challenge for Hogan heading into 2018 is solidifying support in suburbs that tilted Democrat in the presidential election, including Anne Arundel, Howard and Baltimore counties.

Together, voters in those jurisdictions favored Hogan by 22 points in 2014 but supported Clinton by 16 points over Trump last year. And his support among them for a second term is eroding: Voters in Anne Arundel, Howard and Baltimore counties said they would back Hogan over a generic Democrat by a margin of 34 points — 59 to 25 percent — last fall but by 14 points in the new survey.

Michael Psenicska, a 73-year-old math teacher in Baltimore County, opposed Hogan in 2014 but says he’s open to voting for him, because he doesn’t see any strong Democratic challengers and he appreciated Hogan coming out in favor of the fracking ban.

“I do think he will win reelection, and I won’t be totally upset with it. I don’t agree with everything, but he’s trying ” said Psenicska, who was raised in housing projects with government assistance. He said Hogan would more likely get his support if he “shows me that he has a little more compassion for people who don’t have money.”

The poll, conducted Thursday through Sunday among a random sample of 914 Maryland residents reached on landline and mobile phones, has a margin of sampling error of plus or minus four percentage points.