Senate President Thomas V. Mike Miller (D-Calvert), left, and Maryland Gov. Larry Hogan (R) laugh as they sign a series of bills during a ceremony in Annapolis on April 10. (Patrick Semansky/AP)

THE JUST-ENDED legislative session in Annapolis was not quite the bipartisan kumbaya festival that Maryland Gov. Larry Hogan has portrayed — but it wasn’t far off.

Mr. Hogan, a Republican, clashed with Democrats who control the state legislature when they wrested away some of his power over the dispersal of hundreds of millions of dollars annually for school construction and renovation, and when they moved to impede local school boards in the firing and disciplining of teachers and other school employees. He wouldn’t give his imprimatur to a bill to promote voting by automatically registering state residents when they interact with the Motor Vehicle Administration or other state agencies, allowing it to become law without his signature. At one point, state Senate President Thomas V. Mike Miller Jr. (D-Calvert) said that even as the governor preached comity, “His Facebook messages spew hate.”

But those cross words were trifles compared with the real work that got done in the General Assembly, which, mainly with Mr. Hogan’s active support or cooperation, enacted a slew of significant legislation. Bipartisanship is a distant memory in Washington and many state capitals. In Annapolis, this year at least, it was robust.

After a major turnaround by Mr. Hogan, the two parties managed to agree on a measure to increase the state’s subsidy for Metro by $167 million annually — a critical piece of an overall $500 million boost, in partnership with the District and Virginia, that will help Metro halt its slide into obsolescence. Lawmakers passed, and Mr. Hogan signed, a crucial one-year patch that will use $380 million in taxes collected from health insurers to prevent spikes in premiums for 150,000 Marylanders, and prevent a collapse in the state’s Obamacare insurance marketplace.

The governor and legislators enacted an $8.5 billion package of incentives designed to lure Amazon to locate its second headquarters in Montgomery County, as well as a measure that will protect hundreds of thousands of taxpayers from taking a hit on their state taxes as a result of the sweeping tax bill passed last year by Congress.

On public safety, the governor backed Democratic lawmakers, as well as the Democratic mayor of Baltimore, Catherine E. Pugh, on a compromise bill stiffening prison sentences for repeat violent offenders, while allowing other felons to have their convictions expunged after 15 years. Despite opposition from some gun rights advocates, Mr. Hogan also embraced “red flag” legislation, empowering judges to order the temporary confiscation of firearms from individuals deemed a danger to themselves or others.

The governor also signed a school safety bill mandating police coverage or resource officers for public schools across the state, 1,000 of which (out of 1,400) currently lack such protection. That bill, which also requires lockable classroom doors and active-threat drills, was sponsored by state Sen. Katherine A. Klausmeier, a Baltimore County Democrat targeted by Republicans in this fall’s elections.

No doubt, Mr. Hogan, facing reelection and mindful that he is a conservative in a state where Democrats outnumber Republicans 2-to-1, is acting in his political self-interest by working across the aisle. Yet if the measure of an executive is his ability to get things done in a field of competing interests, Mr. Hogan has had a successful year. So have his Democratic adversaries, and partners, in the legislature.