In a move that it says is designed to protect the heart health of Americans, the U.S. Food and Drug Administration said Tuesday that food manufacturers have three years to remove artificial trans fats from the nation's food supply.

The FDA ruled that partially hydrogenated oils -- the major source of trans fats in the American diet -- are no longer "generally recognized as safe," the designation that for decades has allowed companies to use the oils in a wide variety of food products.

Consuming trans fats simultaneously increases "bad" LDL cholesterol and drives down "good" HDL cholesterol in a person's bloodstream. The FDA has estimated that removing partially hydrogenated oils from food could prevent as many as 20,000 heart attacks and 7,000 deaths from heart disease every year.

Partially hydrogenated oils are created by pumping hydrogen into vegetable oil to make it more solid, and are used to improve the texture, shelf life and long-term flavor of processed foods, according to the FDA.

Partially hydrogenated oils are most often found in processed foods such as baked goods like cakes, cookies and pies; non-dairy creamers; microwave popcorn; frozen pizza; margarine and other spreads; vegetable shortenings; and refrigerated dough products like biscuits and cinnamon rolls.

Companies have until June 18, 2018, to either reformulate their products and remove all partially hydrogenated oils, or petition the FDA to permit specific uses of the oils, the agency said Tuesday.

"Following the compliance period, no partially hydrogenated oils can be added to human food unless they are otherwise approved by the FDA," the agency said in a news release.

Food manufacturers have voluntarily lowered the amounts of partially hydrogenated oils in food products by 86 percent since 2003, and continue to remove them from products, according to the Grocery Manufacturers Association.

"Part of the impetus for the reduction was FDA's requirement, which became effective in 2006, that trans fat be declared on the Nutrition Facts label," said Michael Taylor, the FDA's deputy commissioner for foods and veterinary medicine, said during a media briefing Tuesday.

Despite this, even savvy consumers still are being exposed to minute levels of trans fats from partially hydrogenated oils, added Susan Mayne, director of the FDA's Center for Food Safety and Applied Nutrition.

That's because under current rules, products that have less than 0.5 grams of trans fats are labeled as zero grams of trans fats on the Nutrition Facts label.

"Even if consumers choose food products that say they have zero grams of trans fats on the label, they still can be getting small amounts of partially hydrogenated oil that can add up to a considerable intake of trans fat when you look at the overall diet," Mayne said.

Dr. Georges Benjamin, executive director of the American Public Health Association, praised the FDA's announcement, calling it the result of "nearly 25 years of scientific research and advocacy."

"The evidence is clear. There is no safe level of trans fat," Benjamin said in a statement. "Removing this source of industrial trans fat in the food supply will prevent thousands of preventable illnesses and deaths each year from heart disease."

Jim O'Hara is director of health promotion at the Center for Science in the Public Interest, which petitioned the FDA to ban trans fats nine years ago. He said, "This is going to be a huge public health victory. It's time to get trans fats out of the food supply."

In November 2013, the FDA released a tentative determination that partially hydrogenated oils should not be generally recognized as safe, and opened the matter up for public comment.

The agency ended up receiving more than 6,000 comments from consumers, industry, advocacy groups and academic researchers, Taylor said.