Larry Hogan at the 38th Annual J. Millard Tawes Crab and Clam Bake in Crisfield, Md., as a gubernatorial candidate in 2014. (Patrick Semansky/Associated Press)

DEMOCRATIC LAWMAKERS in Maryland are a frustrated lot. Having run what amounted to a one-party state for all but four of the past 45 years, they are now bewildered by a popular Republican governor. Some of them regard Gov. Larry Hogan as a crafty illusionist whose main asset is good fortune. In fact, Mr. Hogan has been shrewd about one big thing: perfectly reading the state’s political mood.

Mr. Hogan, who never ran for statewide office before his 2014 gubernatorial campaign, enjoys phenomenal poll numbers. In one recent survey, just over 70 percent of Marylanders approved of his performance, higher than almost any other governor. Even in the city of Baltimore, whose residents are about two-thirds African American and heavily Democratic, his popularity is an astonishing 72 percent.

Mr. Hogan’s secret sauce is equal parts common sense, humility and cunning. He has had the common sense to oppose his party’s presidential nominee, Donald Trump, and avoid no-win social issues such as abortion and gun control in a liberal state; the humility to pursue a limited agenda, focusing on modest trims to taxes and spending; and the cunning to make — or let — the state’s Democratic grandees look partisan and churlish.

All that sounds simpler than it is. Of 31 sitting Republican governors, Mr. Hogan is one of just two to oppose Mr. Trump. (The other is Charlie Baker of Massachusetts.) That, plus his reluctance to fight over social issues, has prompted muttering among some GOP stalwarts about a primary challenge. And while Mr. Hogan, as a candidate, attacked the serial tax increases enacted by his Democratic predecessor, Martin O’Malley, he has been sufficiently realistic to accept tax cuts that are scarcely more than tokens.

The crossfire that Mr. Hogan has exchanged with Democrats who dominate the state legislature has been notable mainly for the small stakes over which the two sides are squabbling. A recent quarrel involves $80 million in projects — including money for school renovations and to help localities fund teacher pensions — bundled together by lawmakers and presented as an all-or-nothing package. Faced with a revenue shortfall, Mr. Hogan thumbed his nose at the package, while at the same time fiddling with the budget to cover about half the spending. That vexed Democrats while underlining the governor’s pragmatism.

Another tussle is over a $20 million state loan for Northrop Grumman, one of Maryland’s biggest employers, negotiated by Mr. Hogan. Leading Democrats demand to know why the state can afford corporate welfare for a giant defense contractor but not funding to upgrade dilapidated Baltimore schools.

Fair question, but small potatoes in the context of Maryland’s $42 billion budget. And many Democrats are loath to attack the Northrop Grumman deal, which provides incentives for the firm to keep hiring and investing in the state for years to come.

It is possible to criticize Mr. Hogan for playing small ball, lacking any grand vision and taking occasionally gratuitous partisan potshots. But his measured, moderate approach is working for most Marylanders.