WASHINGTON — Artificial trans fats, a key ingredient in everything from pastries to pizzas to microwave popcorn for generations, will be banished from America’s food supply under a new federal proposal because of their risk to public health.

The Food and Drug Administration on Thursday took the first steps toward eliminating the artery-clogging substance, saying the change could prevent 20,000 heart attacks and 7,000 deaths caused by heart disease each year.

Products containing trans fats have increasingly disappeared from grocery stores and restaurant menus in recent years amid widespread agreement about the risks they pose to public health. But trans fats still linger in an array of processed foods, including pancake mix, packaged cookies and ready-made frosting.

Thursday’s action, one of the FDA’s most aggressive efforts to limit Americans’ consumption of a specific food ingredient, was aimed at ending the era of trans fats altogether.

“While consumption of potentially harmful trans fat has declined over the last two decades in the United States, current intake remains a significant public health concern,” said FDA Commissioner Margaret Hamburg.

Cities such as New York and Philadelphia have previously imposed bans on artificial trans fats in restaurants, and since 2006 the FDA has required food manufacturers to print details about them on nutrition labels. As a result, intake among Americans declined from 4.6 grams of trans fat per day in 2003 to about one gram per day last year, according to the agency.

The FDA said Thursday it will accept public comments for 60 days on its proposal. While government officials acknowledged that entirely phasing out trans fats is likely to take years, they said they were confident that it will happen.

Under the FDA proposal, trans fats would no longer be among ingredients in the largely unregulated category known as “generally recognized as safe,” or GRAS. Companies wanting to use trans fats in any foods would have to petition the agency and meet “rigorous safety standards” showing that they would cause no harm to public health, said Michael Taylor, the FDA’s top food-safety official. Given the growing body of scientific evidence about the dangers of trans fats, that could be a tough sell, Taylor said.

Not that manufacturers or restaurant chains are likely to go that route.

In recent years, responding to consumer demand and pressure from regulators, food companies have been removing trans fats from an array of products. Many of the country’s best-known food chains, from Dunkin’ Donuts to Taco Bell to McDonald’s, have been eliminating trans fats in their pastries and fried foods. Retail giant Wal-Mart has given its suppliers until 2015 to phase out artificial trans fats. Even Crisco, the iconic shortening that has been a staple of American pantries for a century, altered its formula to remove trans fats years ago.

Still, the trans-fat purge was a long time coming.

They became widely popular during the 1940s, in part because they were cheaper than products made from animal fat and because they proved effective in extending the shelf life of baked and fried foods while creating desired taste and texture.

“They were an innovation at the time,” said Robert Collette, president of the Institute of Shortening and Edible Oils. “They were cost effective, and they had all these useful characteristics.”

Trans fats come from partially hydrogenated oils, which occur when manufacturers add hydrogen to vegetable oil to make a more solid substance. The result is a versatile product that is typically longer lasting, cheaper and just as functional as animal-based fats such as butter or lard.

As recently as the 1980s, many scientists and public-health advocates believed that partially hydrogenated oils not only were safe but were healthier than the more natural saturated fats they had replaced. The tide had changed by the mid-1990s as more scientific studies made it clear that trans fats increase the level of LDL — bad cholesterol — and put consumers at higher risk for heart disease.

In 1994, as evidence mounted of the heart-clogging attributes of trans fats, the advocacy group Center for Science in the Public Interest petitioned the FDA to require that trans fats be listed on nutrition labels. In 2002, the Institute of Medicine found that there was “no safe level of trans fatty acids and people should eat as little of them as possible.”

The FDA’s Taylor said manufacturers and restaurants for years have been demonstrating that they can remove trans fats from their foods without significantly disrupting bottom lines.