Gold balloons announcing the “GRAND OPENING” of Zaza City Convenience in southeast Queens were still floating in the shop last month when the authorities cleared its shelves of cannabis and tobacco products that were illegal to sell in New York. After the police officers had bagged and weighed the contraband and sent it off in an evidence van, a sheriff’s sergeant sealed the entrances to the store with padlocks.

Similar scenes have played out across New York City as a task force led by the Sheriff’s Office has flexed its new emergency powers to lock down unlicensed cannabis shops, which officials recently estimated outnumbered licensed retailers in the city by about 2,900 to 62. From May 7 to June 3, inspection teams closed 311 stores, seized $10.4 million worth of products and issued $23.4 million in fines, according to the mayor’s office. An additional 325 shops were put on notice.

Previously, shuttered stores could reopen within hours of inspections while officials sought court orders to shut them down permanently. But changes enacted in this year’s state budget and the city code have given the Sheriff’s Office the power to declare the shops an imminent threat to the public and close them immediately for up to a year.

Sheriff Anthony Miranda, in an interview at his office in Queens, said that the padlocks cut off income that the shops relied on to absorb the cost of violations. While some stores continue to evade enforcement by warning each other when inspectors are nearby or shifting to delivery services — even reviving weed trucks — others have stopped selling cannabis or shut down completely, he said.

“It’s not just the cost of doing business anymore,” he said. “They’re going to feel this.”

Following the state’s legalization of cannabis for recreational use in 2021, rogue smoke shops multiplied like an invasive species. Convenience store owners seized an opportunity to shore up their bottom lines, as did landlords whose spaces were emptied by the long decline in traditional businesses like salons and restaurants.