WASHINGTON (AP) — U.S. health officials will ban most flavored e-cigarettes popular with underage teenagers, but with major exceptions that benefit vaping manufacturers, retailers and adults who use the nicotine-emitting devices.

The Trump administration announced Thursday that it will prohibit fruit, candy, mint and dessert flavors from small, cartridge-based e-cigarettes that are popular with high school students. But menthol and tobacco-flavored e-cigarettes will be allowed to remain on the market.

The flavor ban will also entirely exempt large, tank-based vaping devices, which are primarily sold in vape shops that cater to adult smokers.

Together, the two exemptions represent a significant retreat from President Donald Trump’s original plan announced four months ago, which would have banned all vaping flavors — including menthol — from all types of e-cigarettes. The new policy will preserve a significant portion of the multibillion-dollar vaping market. And the changes are likely to please both the largest e-cigarette manufacturer, Juul Labs, and thousands of vape shop owners who sell the tank-based systems, which allow users to mix customized flavors.

E-cigarettes are battery-powered devices that typically heat a flavored nicotine solution into an inhalable aerosol. They have been pitched to adults as a less-harmful alternative to traditional cigarettes, but there is limited data on their ability to help smokers quit.

The Food and Drug Administration has struggled for years to find the appropriate approach to regulating vaping. Under current law, all e-cigarettes are supposed to undergo an FDA review beginning in May. Only those that can demonstrate a benefit for U.S. public health will be permitted to stay on the market.

“We have to protect our families,” Trump told reporters on Tuesday, ahead of the announcement. “At the same time, it’s a big industry. We want to protect the industry.”

The flavor ban applies to e-cigarettes that use pre-filled nicotine cartridges mainly sold at gas stations and convenience stores. Juul is the biggest player in that market, but it previously pulled all of its flavors except menthol and tobacco after coming under intense political scrutiny. Many smaller manufacturers continue to sell sweet, fruity flavors like “grape slushie,” “strawberry cotton candy” and “sea salt blueberry.”

The flavor restrictions won’t affect the larger specialty devices sold at vape shops, which typically don’t admit customers under 21. These tank-based systems allow users to fill the device with the flavor of their choice. Sales of these devices represent an estimated 40% of the U.S. vaping business, with sales across some 15,000 to 19,000 shops.

Still, the new policy represents the federal government’s biggest step yet to combat a surge in teen vaping that officials fear is hooking a generation of young people on nicotine. In the latest government survey, more than 1 in 4 high school students reported using e-cigarettes in the previous month, despite federal law banning sales to those under 18. Late last month Trump signed a law raising the minimum age to purchase all tobacco and vaping products from 18 to 21 nationwide.

“We will not stand idly by as this crisis among America’s youth grows and evolves, and we will continue monitoring the situation and take further actions as necessary,” Health and Human Services Secretary Alex Azar said in a statement. Companies that don’t stop making and distributing the restricted products within 30 days risk penalties by the FDA, including fines and seizures.

Incoming FDA Commissioner Stephen Hahn said the government’s approach attempts to balance the problem of underage vaping with “the potential role that e-cigarettes may play in helping adult smokers transition completely away” from regular cigarettes.

But the decision to permit menthol and exempt tank-based vapes was immediately condemned by anti-tobacco advocates who have lobbied the Trump administration to follow through on its initial pledge to ban all flavors except tobacco.

“Only the elimination of all flavored e-cigarettes can end the worsening youth e-cigarette epidemic and stop e-cigarette companies from luring and addicting kids with flavored products,” said Matthew Myers, of the Campaign for Tobacco-Free Kids, in a statement.

Myers’ group and others have long opposed all flavors in tobacco products, including menthol in traditional cigarettes. They argue that teenagers who vape will simply shift to using menthol if it remains on the market.

When Trump officials first sketched out their plans at a White House event in September they specifically said menthol would be banned. But that effort stalled after vaping proponents and lobbyists pushed back and White House advisers told Trump that a total flavor ban could cost him votes.

Industry groups including the Vapor Technology Association launched an aggressive social media campaign — #IVapeIVote — contending that the plan would force the closure of vaping shops, eliminating jobs and sending users of electronic cigarettes back to traditional smokes.

Trump’s initial announcement came amid an outbreak of unexplained lung illnesses tied to vaping. But since then health officials have tied the vast majority of the cases to a contaminating filler added to illicit THC vaping liquids. THC is the chemical in marijuana that makes users feel high. Makers of legal nicotine-based vaping products have tried to distance themselves from the problem.

Trump suggested ahead of the announcement that the flavor restrictions might be temporary.

“Hopefully, if everything’s safe, they’re going to be going very quickly back onto the market,” he told reporters at his Mar-a-Lago resort in Florida.