Health Canada is taking the final steps toward a ban on the main source of artificial trans fats in Canadian diets.

The department says it is banning partially hydrogenated oils or PHOs, which are the main source of industrially produced trans fats in all food sold in the country, including those foods prepared in restaurants.

The oils are used in the production of pastries, other baked goods and some packaged goods as a means of extending shelf life.

The ban will come into force on Sept. 15, 2018, in order to give the food industry enough time to find suitable alternatives.

The substances have been under fire for years and the food industry had been phasing them out on a voluntary basis.

Health Minister Ginette Petitpas Taylor welcomed the ban.

“Eliminating the main source of industrially produced trans fat from the food supply is a major accomplishment and a strong new measure that will help to protect the health of Canadians,” she said in a statement.

The measure was also welcomed by the Heart and Stroke Foundation.

“While trans fats levels have been decreasing, they are still high in baked goods and foods often consumed by children and other vulnerable populations,” the foundation said in a statement.

“Canadians should not have to worry about consuming foods that are not safe to eat.”