For months, the top-selling item at Fat Cat Kitchen was a cookie packed with chocolate chunks, dusted with salt flakes and infused with the stylish cannabis derivative cannabidiol, or CBD. But as of last week, customers won’t find the cookie on the Manhattan restaurant and bakery’s menu.

On Friday, a health inspector sealed up the restaurant’s supply of CBD-infused baked goods in a plastic bag and told Fat Cat Kitchen to stop selling them as part of a citywide embargo on food products containing CBD. The Department of Health and Mental Hygiene confirmed on Tuesday that it was ordering restaurants under its jurisdiction not to sell food products containing CBD. In a statement, the health department said that New York City eateries were not “permitted to add anything to food or drink that is not approved as safe to eat.” That included CBD, which had not been “deemed safe as a food additive,” the department said. The crackdown was first reported by Eater.

CBD is a chemical compound in the cannabis plant that is closely related to tetrahydrocannabinol, or THC, the main component in marijuana. Unlike THC, however, CBD is not psychoactive — that is, it will not get consumers high. In the last few years, CBD has become increasingly popular. It has been hailed as a kind of wonder-drug; a remedy for anxiety, pain, acne, inflammation and insomnia, among other ailments.

With its supposed benefits mounting (despite a relative dearth of strong scientific studies to back all of them up), CBD became an increasingly popular additive in consumer products. It showed up in topical oils, skin creams, and food and drink.

[Read more on why is CBD everywhere.]

Whether the compound is legal has been a source of confusion. In June, the federal Food and Drug Administration approved the first CBD prescription drug to be sold in the United States. But the Drug Enforcement Administration has said CBD is illegal because it comes from cannabis, a banned Schedule 1 drug. And on its website, the F.D.A. says products with CBD cannot be sold as dietary supplements or in food that crosses state lines.

New York City is not alone in addressing the use of CBD in food. In Maine, one of 10 U.S. states that has legalized marijuana for recreational use, state health officials recently ordered businesses to remove CBD-infused edibles from stores, The Portland Press Herald reported.