During the General Assembly session that ended Monday night, Maryland’s governor supported legislation that will result in more than $700 million in tax increases. Part of it, he backed as essential to protecting Obamacare; much of the rest is being set aside for a down payment on what’s expected to be a big increase in education funding next year. The governor battled the Trump administration on clean cars and dirty power plants, supported three significant gun control measures and allowed bills to become law that establish automatic voter registration, protect LGBT youth and support public sector unions.

It was, all around, an excellent session for Martin O’Malley.

Wait, what’s that you say? He’s not governor anymore? It’s Larry Hogan? The Republican Larry Hogan? The guy who ran against taxes and away from any discussion of hot-button social issues? The one who once called the state teachers union “thugs”?

These are strange times in Annapolis.

Here are some of the bills approved by the Maryland General Assembly during its 2018 90-day session, which ended April 9. The legislation goes to Gov. Larry Hogan for his signature or veto. He also can allow bills to become law without his signature.

(Erin Cox, Michael Dresser, Scott Dance)

Four years ago, Mr. Hogan was running as an outsider against the establishment. Now he is the establishment. Four years ago, Mr. Hogan found himself in a good political environment for Republicans; now he’s staring down the barrel of the worst one the GOP has seen in years. Given what’s happened in special elections in reliably conservative states and districts since Donald Trump became president, Mr. Hogan has reason to fear getting drowned in a massive blue wave in November. All the great approval ratings he’s notched in poll after poll will do no good if voters come out in droves to vote against anyone with an “R” after their name. Mr. Hogan has no primary challenger, and he has faced no pressure whatsoever to tack to the right in the run-up to this election. He hasn’t abandoned the issues that got him elected — about $400 million of the increased taxes for next year are the unintended consequences of the Trump tax cuts, and without the efforts of the governor and legislature, the hit to Maryland taxpayers would have been worse. Mr. Hogan expressed regret that the legislature wouldn’t go farther in erasing the negative consequences of the federal legislation, but he didn’t draw a line in the sand over it either. It was typical of a session in which he did just about everything possible to make voters forget his party affiliation.

If you think Mr. Hogan’s performance this year is just cynical electoral politics, you haven’t been paying enough attention to what he’s been up to throughout his term. Sure, he spars with Democrats from time to time. He calls them names occasionally, and they reciprocate. But in general, he’s been more willing to glom onto issues Democrats have been pushing for years — on fracking, paid sick leave, terminating parental rights of rapists, etc. — than to rail against them. This year has certainly brought about an unusual confluence of instances in which Mr. Hogan has been willing to go along with the Democrats in the legislature — or at least to stay out of their way — but that tendency has been part of his modus operandi from the start. That’s not a reaction to the political environment of 2018, it’s a sign that Mr. Hogan learned the lessons of 2006.

Then, Mr. Hogan was a member of Robert L. Ehrlich Jr.’s administration, and he saw what happened when a Republican governor prized conflict over compromise. From medical malpractice reform to BGE rates, Mr. Ehrlich repeatedly fought Democrats in ways that delighted his Republican base but alienated moderates and energized progressives. Mr. Hogan, by contrast, has repeatedly shown a reluctance to fight losing battles and a willingness to claim victory on his agenda even when Democrats amend it almost beyond recognition. Mr. Ehrlich’s message in 2006 was that he was still fighting the establishment. Mr. Hogan’s is that he has the most productive relationship of any governor in the country with a legislature controlled by the other party.

Kenneth K. Lam, Baltimore Sun

Republican Gov. Larry Hogan said the 2018 legislative session was "probably our most successful session out of all four years.”

Republican Gov. Larry Hogan said the 2018 legislative session was "probably our most successful session out of all four years.”

(Kenneth K. Lam, Baltimore Sun)

It’s telling that the only real fight between the governor and legislature this session was over a bill aimed not at him but at a Democrat — Comptroller Peter Franchot. Mr. Hogan couched his opposition to legislation to change how the state approves school construction funding as a defense of the transparency and accountability the Board of Public Works provides, but it was clear that he was really sticking up for Mr. Franchot, whose role in the process will be eliminated entirely under the legislation. (The governor’s authority will arguably be greater under the new law.) Mr. Franchot could be the only elected Democrat of any stature who does not actively campaign against Mr. Hogan — in fact, he’s planning to campaign in the primaries against Senate President Thomas V. Mike Miller and House Speaker Michael E. Busch. A Franchot endorsement of the governor is hardly inconceivable. That would be tremendously valuable to Mr. Hogan’s re-election prospects because it would make it harder for Democrats to paint him as a partisan Republican.

Mr. Hogan has set himself up for the fall election about as well has he possibly could. Maybe the anti-Trump wave in a state like Maryland will be so strong that none of this will matter in November. But we’d advise Democrats not to count on it.