Editorial writer and columnist

Even by the standards of America’s troubled jails and prisons, the scandal at the Baltimore City Detention Center is appalling.

A gang known as the Black Guerrilla Family took over the center, trafficking in drugs, cellphones and sexual favors with the connivance of at least 13guards, several of whom are bearing a gang boss’s children, according to a federal indictment.

Among the many lessons from this sorry situation is one that experience elsewhere has already taught many times: Good governance is not necessarily consistent with the demands of government unions, in this case the union representing Maryland’s correctional officers.

God-awful as it is, the mess at the center was not exactly unprecedented. Between April 2009 and August 2010, the Baltimore City Paper published 14 articles detailing gang-related corruption at state correctional institutions.

And it was during this time that Maryland’s branch of the American Federation of State, County and Municipal Employees (AFSCME) lobbied for legislation known as the “Correctional Officers Bill of Rights” (COBR).

Advertised as much-needed procedural protection against unfair accusations of brutality, COBR established elaborate rules — including a guaranteed appeal hearing in front of a three-member board of fellow officers — for correctional officers suspected of wrongdoing. The bill says that prison managers can’t even “threaten” prosecution, transfer, dismissal or disciplinary action during questioning.

It passed the House of Delegates unanimously and the Senate 44 to 2. Gov. Martin O’Malley (D) signed it into law on May 4, 2010.

In the union’s view, prison administrators had “pulled the trigger too quickly” on discipline in the past, as AFSCME spokesman Jeff Pittman put it.

But according to an FBI special agent’s affidavit attached to the Baltimore indictment, COBR has all but disarmed managers at the Baltimore jail. Discipline “has proven to be very difficult,” the agent wrote, and “the internal review process set up by COBR is ineffective as a deterrent to [correctional officers] smuggling contraband or getting sexually involved with BGF gang members.”

These consequences may have been unintended, but they were hardly unforeseeable. Shortly before COBR was passed in 2010, the City Paper asked the bill’s chief sponsor, state Sen. Donald Munson, how it might affect the department’s efforts to purge gang-connected correctional officers. “I’ve never thought of this measure in this context,” Munson replied. “My guess is that the correctional officers who are going to be judges are going to be very hard on those cases,” he added. “If it doesn’t work, we’ll fix it in the future.”

A Republican, Munson at the time was fighting — unsuccessfully, it turned out — for reelection in a Washington County district heavily populated with unionized correctional officers and their families. (He declined my request to comment.)

Not only was support for COBR bipartisan but the Department of Public Safety and Correctional Services, under O’Malley, also backed the bill, in part because it lengthened the period after which management must either file or drop a charge from 30 days to 90.

In almost every other way, however, the legislation weakened management prerogatives, a state surrender of control over its workforce that’s difficult to explain in terms of the public interest — but easy to explain politically.

Keeping watch over often-violent offenders is a tough job that most correctional officers do honestly. They deserve a decent wage and fair treatment on the job.

But neither they nor any other workers who serve the public deserve special influence over state government.

That is what they get when their unions accumulate cash through mandatory dues checkoffs — from tax-funded payrolls — and spend it on campaign contributions and lobbying.

One of the most powerful public-sector unions in the country is the California Correctional Peace Officers Association, which used its political might to secure not only expensive pensions and benefits but also passage of a “three strikes and you’re out” law — which created jobs for unionized correctional officers by swelling California’s prison population.

Maryland’s correctional officers union is not nearly that powerful, but its officials are working on it.

“From the beginning, AFSCME Maryland set an aggressive agenda,” the union’s Web site boasts. “Recognizing that state laws and political decisions controlled our work lives, AFSCME Maryland members embarked on a mission to develop political power through legislative action.”

COBR epitomizes that strategy. Among the “correctional officer’s rights” specified in Section 11-1004 of the bill, “political activity” is first on the list.

Read more from Charles Lane’s archive, follow him on Twitter or subscribe to his updates on Facebook.