HAVE MEMBERS of the Maryland state Senate suffered memory loss? Or are they so in thrall to public employees’ unions that their judgment has become impaired?

What other explanation is there for a bizarre piece of legislation in Annapolis that would forbid county governments from cutting anything from large categories of their budget, on pain of losing state aid — even if a severe economic downturn guts local revenues, as was the case just a few years ago?

The effect of the bill would be to force local governments to maintain spending levels on jails, libraries, roads, police, sheriffs and fire departments. The measure would allow no exceptions, even as priorities shift, populations shrink or emergencies arise. To comply with the legislation in such circumstances, local officials would have no choice but to raise taxes, since cutting spending would be off the table.

Imagine if a corporation were to adopt such a stricture, ruling out spending cuts as a matter of policy. Shareholders would flee and its stock would plummet.

The four sponsors of the bill include three Democratic senators from Montgomery County, Richard S. Madaleno Jr., Roger Manno and Nancy J. King, and one from Prince George’s County, Douglas J.J. Peters. Their legislation is a sop to public employee unions — particularly those representing law enforcement officers and firefighters — who would like to inoculate themselves from the pain of future downturns. It is heedless of the interest of taxpayers, who expect local officials to make government lean and efficient.

Annapolis has never held itself to the standard that the bill would impose on localities. In the recent recession, the state gutted outlays for transportation, particularly for local roads. That may or may not have been wise policy, but no one suggested that lawmakers had exceeded their authority by embracing it.

Last year, at the behest of the teachers union, Maryland lawmakers enacted legislation making it all but impossible for counties to trim per-pupil spending on public schools. In many jurisdictions, this so-called “maintenance of effort” law eliminated their discretion over about half of all local spending.

Now, with this bill, lawmakers would put much of non-school spending beyond the reach of rational budgeting. In Montgomery County, the state’s biggest locality, the bill, coupled with last year’s legislation shielding schools (plus obligatory debt payments and retiree health insurance) would mean 80 percent of local spending would be shielded from cuts in perpetuity. That’s nuts.

Consider, for example, a recent report in Montgomery showing that police and firefighters are driving up overtime costs by abusing sick-leave policies. Would the bill’s sponsors protect that spending from cuts too?

If the bill passes, what could be cut from local budgets? Housing and public health, for starters. The legislation omits them from its list of “critical services,” perhaps because those agencies’ employees lack the political muscle of teachers, firefighters and police.

The bill’s sponsors may believe that local governments should always raise taxes to maintain programs. But they’re way out of line in writing that belief into law, thereby handcuffing localities indefinitely and precluding reform.