CONCORD, N.H. — New Hampshire prison officials don’t allow inmates to get legal briefs through the mail; they’ve removed vending machines and board games from visiting rooms, and have barred prisoners and visitors from kissing.

The state insists the restrictions are needed to stop drugs from entering the prisons.

Fueled by the ongoing opioid crisis, officials said that drugs in prisons are on the rise and that the numbers of inmates testing positive for drugs has more than tripled since 2014.

“I am responsible for maintaining a safe and secure facility for the safekeeping of all inmates,” said William Wren, commissioner of the New Hampshire Department of Corrections.

New Hampshire is part of a growing number of states that are cracking down in the face of an opioid crisis. The opioid-substitute Suboxone, which comes in thin, translucent film form that looks like breath strips, is becoming a popular drug in prisons. One strip goes for as much as $300 behind bars.

Corrections officials in New Hampshire say visitors are coming up with increasingly innovative ways to get drugs inside.

Several New Hampshire jails have introduced visits by video, which critics have suggested is more about saving money than fighting drugs. They’re doing the same in Maine.

“It’s really in response to contraband that was getting in. I felt that it was concerning enough for me just to cancel them,” said York County sheriff William King. In-person visits were dropped there after a string of overdoses in 2015.

The restrictions have angered inmates and their supporters, with inmates at a Berlin, New Hampshire, prison refusing to eat for a day in protest over the policy of no kissing and limited hugging.

Inmates in a Concord prison lit a small fire in a protest that led to a three-day lockdown. The American Civil Liberties Union of New Hampshire has a 2015 federal lawsuit pending on behalf of a prisoner’s mother and 3-year-old son over a ban on greeting cards, picture postcards and children’s drawings.

“We all understand that drugs being smuggled into the prison is something that should be prevented. We have no doubt that Suboxone is a problem in New Hampshire prisons,” said Gilles Bissonnette, the group’s legal director. “But I don’t think the way to address that is to indiscriminately ban innocent speech including speech of a child to their loved one in prison.”