The Maryland Correctional Institution for Women in Jessup. (Andre Chung/for The Washington Post)

PRISONS AND jails are struggling to contain the spread of an easily smuggled drug, Suboxone, prized by incarcerated addicts to dampen their craving for heroin and other hard-to-get opioids. But in trying to keep it out of facilities, some corrections officials are going overboard, imposing restrictions that punish the families and children of inmates, most of whom are blameless.

That is what has occurred in Maryland, where, in an effort to block Suboxone and other contraband, state prison authorities established a policy that prevents inmates from prolonged holding or cuddling even their small children and babies. The policy, in effect since last fall, is draconian and cruel: It applies equally to fathers, mothers and even grandmothers behind bars, including one who wrote a moving piece in The Post’s Outlook section this month, pleading for more time to hold her baby granddaughter.

The challenge posed by Suboxone is that it is maddeningly easy to conceal and convey as contraband. It comes in the form of pills that can be crushed and ingested or wafer-thin strips that can be hidden in the pages of a notebook, a deck of cards — even behind a postage stamp on a letter.

Prison administrators are right that Suboxone poses a real problem. Although it provides a milder high than heroin, its presence in penal institutions, like that of any banned substance, can spur drug dealing and violence.

The trouble is that the policy they have devised is overkill, and there is little indication it works. It forbids inmates from physical contact with their loved ones until the end of a visit, and then permits only a brief embrace. That may make some sense for adult visitors; for small children, who need physical affection from parents and grandparents, it is callous.

There is also little indication it is effective. Prison authorities have no data — none — showing that children have been frequently used to convey contraband. What’s more, seizures of Suboxone and other illicit drugs conveyed by visitors dropped just 16 percent in the first seven months of this year compared with the same period last year. That suggests the impact of the restrictions, imposed Nov. 30, is marginal at best.

In large part, the policy was driven by a scandal at the Baltimore city jail three years ago, in which inmates had effectively taken charge of the facility, procuring all manner of contraband, including drugs and cellphones, in copious quantities. But in that case, the contraband was conveyed not by visitors but by jail guards, including women who were having sex with prisoners.

Societies are fairly judged by how they treat those they have condemned. Correctional institutions are not, and should not be, summer camps, but they are wise to strike a balance between the need for effective security and control, and the value of compassion and humanity in promoting rehabilitation. In Maryland, officials have gotten the balance wrong by denying small children and inmates, including mothers, the opportunity of engaging in more than fleeting moments of physical affection.