Police discovered a cannabis set up in the home of a man aged in his 60s after they were called out to reports of a gas leak.
Police and fire services rushed to the scene in Albert Road, Mexborough, and evacuated residents from about 20 homes after they reported a strong smell of gas.
Firefighters wearing breathing apparatus managed to locate the leak in the cellar of an empty property.
However, after turning the mains off they alerted police that they had found a drugs set up in the rooms of one of the other properties they had searched.
Police found about 10 cannabis plants and brought a 61-year-old man in for questioning.
Sergeant Melissa Gill told the Partners And Community Together meeting in Mexborough: “The leak was coming from the cellar and also a kitchen appliance.
“We evacuated people from about 20 properties as a precaution. It was unexpected to find a cannabis set up, but the problem is widespread.”
Resident Frank Knapton MBE, 77, who lives nearby in Morton Road, Mexborough, said: “It just shows the importance of phoning the emergency services if you smell a gas leak.
“This could have been potentially very dangerous,” he added.
A spokeswoman for South Yorkshire Police said: “While managing this incident, a small cannabis setup was discovered at a property in Albert Road. A 61-year-old man has been interviewed under caution.”
She added he was released while officers conduct further inquiries.