Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Heart attacks and strokes fell by more than 6 percent three years after some New York counties banned trans fats, researchers reported Wednesday.

A national ban on trans fats starts in 2018 and the study by a team at Yale University shows it may not only cut deaths, but non-fatal heart attacks and strokes as well.

Trans fats, found in oils used to make cookies, crackers, microwave popcorn and to fry fast food, stay fresh longer than liquid fats. But the chemical process used to make them solid like butter also makes them clog arteries just like butter or lard does.

New York cities and counties were among the first to start banning them in restaurants and fast-food outlets. “New York City was the first large metropolitan area in the United States to restrict trans fats in eateries, starting July 2007," the researchers wrote in their report in the Journal of the American Medical Association’s JAMA Cardiology.

Related: FDA to Limit Trans Fats in Foods

Dr. Eric Brandt, of the Yale University School of Medicine, and colleagues checked medical records to see if it made any real difference. It did, they reported.

They compared counties where there were bans to counties where there were not.

“There was an additional 6.2 percent decline in hospital admissions for myocardial infarction (heart attack) and stroke among populations living in counties with vs without trans-fatty acid restrictions,” they wrote.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“A nationwide trans fat ban is a win for the millions of people at risk for cardiovascular disease,” Brandt said in a statement.

French fries that were made in trans fat-free cooking oil are poured from the fryer in Newark, New Jersey on Feb. 16, 2007. Mike Derer / AP file

The team did not measure deaths but lower rates of strokes and heart attacks have been shown in many studies to results in lower rates of deaths, as well.

The Food and Drug Administration has ruled that partially hydrogenated oils are no longer "generally recognized as safe" or GRAS. That means that after 2018, food manufacturers would have to ask the FDA for permission to use them in food products.

Trans fats are formed when liquid oils are chemically altered using a process called hydrogenization. This makes them similar to butter or lard. But the process almost makes these fats at least as unhealthy as, if not more unhealthy than, saturated fats.

The food industry and even health advocates at first thought they were better for health. It wasn't until the 1980s that medical research began to show clearly that they are not.

Related: What's So Bad About Trans Fats?

The debate confused the U.S. public, and many people still believe that butter is better for 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 bad cholesterol, but margarines made using unsaturated fats and polyunsaturated fats do not.

“A nationwide trans fat ban is a win for the millions of people at risk for cardiovascular disease."

The FDA estimates that 80 percent of trans fats are already gone from U.S. foods.

Good substitutes for partially hydrogenated fats and saturated fats are liquid oils such as olive oil, canola oil and safflower oil.

“Consumption of trans-fatty acids is associated with unfavorable physiologic changes, including reduced high-density lipoprotein (HDL or ‘good’) cholesterol and increased low-density lipoprotein (LDL or ‘bad’) cholesterol levels, triglycerides, markers of systemic inflammation (C-reactive protein, interleukin 6, and tumor necrosis factor α), and endothelial cell dysfunction,” the team wrote.

Related: New York City Bans Trans Fats

In other words, they clog arteries and make blood vessels unhealthy and inflamed.

Studies have shown that when people eat even small amounts, they have a higher risk of stroke, heart disease and sudden heart death.

Just 2 grams of trans fats can raise a person’s risk, the researchers said. And it’s easy to get that much.

“For example, a large order of Popeye’s Louisiana Kitchen cajun fries contains 3.5 g of trans-fatty acids per serving, Taco Bell’s Cinnabon Delights (12-pack) contain 2.0 g of trans-fatty acids per serving, and multiple varieties of Pillsbury Shape sugar cookies contain 2.5 g of trans-fatty acids per serving,” they wrote.