Cannabis was recovered during a crackdown on drugs being smuggled into prisons in West Yorkshire.
More than 70 people visiting inmates at HMP Newhall, Wakefield and Wetherby were stopped and searched during the operation, police said.
Officers recovered a bag thought to be cannabis, another unknown substance and paraphernalia which had been discarded by a person before entering the prison.
Police said drugs were being passed to inmates during the course of a visit.
The drugs are then being used for personal use or wider distribution inside the prison.
Drugs co-ordinator Bryan Dent said: "Drugs supply into prisons not only undermines the efforts of drugs workers, who aim to help users break the cycle of drugs and crime, but it also impacts on the wider community if people continue to offend on release to feed their addictions.
"Attempting to smuggle drugs or other contraband, such as mobile phones, into prison is a serious offence that carries severe penalties - a lengthy prison sentence in most cases."