Artificial trans-fats are generally unsafe and food manufacturers will have to phase out their use over the next three years, the Food and Drug Administration said Tuesday.
Some food makers and restaurant chains have been finding substitutes for the chemically altered fats, and this long-awaited decision is meant to help get them almost completely out of the food supply.
"This action is expected to reduce coronary heart disease and prevent thousands of fatal heart attacks every year," FDA's acting commissioner Dr. Stephen Ostroff said in a statement.
Trans fats are formed when liquid oils are chemically altered using a process called hydrogenization. This makes them looks and respond more like butter or lard. But the process almost makes these fats at least as unhealthy as, if not more unhealthy than, saturated fats such as butter or lard.
"In this case, it has become clear that what's good for extending shelf-life is not equally good for extending human life," said the FDA's Dr. Susan Mayne, director of the Center for Food Safety and Applied Nutrition.
They can help make cholesterol levels unhealthy, clogging and hardening arteries and raising rates of heart attack and stroke.
They're used to fry food and in baked goods such as biscuits, pizza and pie crust, and also used in microwave popcorn and other snacks.
Under the ruling, partially hydrogenated oils are no longer "generally recognized as safe" or GRAS. That means food manufacturers would have to ask the FDA for permission to use them in food products.
"The FDA encourages consumers seeking to reduce trans fat intake to check a food's ingredient list for partially hydrogenated oils to determine whether or not a product contains partially hydrogenated oils," the FDA said in a statement.
"Currently, foods are allowed to be labeled as having 0 grams trans-fat if they contain less than 0.5 grams of trans fat per serving, including partially hydrogenated oils, the primary dietary source of artificial trans fat in processed foods."
The ruling means that after 2018, even these small amounts may not be in food without FDA permission.
"Today's action is an important step forward for public health," Mayne told reporters.
It's a victory for the non-profit Center for Science in the Public Interest, which sued to force FDA to move faster.
"The eventual elimination of artificial trans-fat from the food supply will mean a healthier food supply, fewer heart attacks and heart disease deaths, and a major victory for public health," said CSPI executive director Michael Jacobson.
"The final determination made today by the Food and Drug Administration gives companies more than enough time to eliminate the last of the partially hydrogenated oil that is still used in foods like microwave popcorn, biscuits, baked goods, frostings, and margarines."
The food industry and even health advocates thought they were better for health than naturally saturated fats such as butter. It wasn't until the 1980s that medical research began to show clearly that they were not.
The debate confused the U.S. public, and many people still believe that butter is better for heart health than margarine. That may have been true of the old margarines made using hydrogenated oils, but it's less true now. Butter does raise cholesterol, but margarines made using unsaturated fats and polyunsaturated fats do not.
RELATED: Mystery meat is back
The FDA estimates that 80% of trans-fats are already gone from U.S. foods. "But we still have room for improvement," Mayne said.
Good substitutes for partially hydrogenated fats and saturated fats are liquid oils such as olive oil, canola oil and safflower oil.
Dairy, beef, mutton and some other animal products contain natural trans-fats and the FDA ruling does not include these.
This article originally appeared on NBCNews.com.