After years of hemming and hawing, the Food and Drug Administration has finally declared artificial trans fat a threat to public health, giving food companies until June 2018 to phase out partially hydrogenated oils, the primary source of trans fat in processed foods.

The decision doesn’t amount to a full ban, allowing companies to petition for small amounts of trans fats if they can present evidence that it won’t cause harm to consumers. But the FDA cautions that food companies will be hard-pressed to find research that contests the negative health effects of trans fats, which it says contribute to as many as 20,000 heart attacks and 7,000 deaths each year.

The restrictions make good on a tentative decision in 2013 that sent food companies scrambling to reformulate products from coffee creamers to frozen pizzas. Local governments, however, were reacting to health research well before then: New York City passed a ban in 2006, followed by California in 2008, and the CDC notes that about 20 percent of Americans already live in an area where local law restricts the use of trans fats. Since 2003, trans fat consumption in America has decreased by about 80 percent, the FDA says, and has contributed to a steep drop in cholesterol rates in children.

Originally seen as an alternative to saturated fat, trans fat gained popularity in the 1940s and still has many uses in the modern food industry, maintaining the vibrancy of sprinkles buttery and the flakiness of biscuits. Since 2006, companies have been required to include trans fats on dietary labels.