McDonald’s U.S. restaurants will gradually stop buying chicken raised with antibiotics vital to fighting human infections, the most aggressive step by a major food company to force chicken producers to change practices in the fight against dangerous “superbugs.” (Shannon Stapleton/Reuters)

McDonald’s said on Wednesday that its fleet of 14,000 U.S. restaurants would stop serving chicken raised with antibiotics “important to human medicine,” a significant change in food policy for the world’s largest fast-food chain.

McDonald’s said the move is an attempt to adapt to diners’ desire for healthier food. The company had one of its most challenging years in history in 2014 as consumers turned away from the brand, often in favor of fast-casual joints such as Chipotle, which have long emphasized a commitment to serving only ethically-raised meat.

“Our customers want food that they feel great about eating — all the way from the farm to the restaurant — and these moves take a step toward better delivering on those expectations,” said McDonald’s U.S President Mike Andres in a statement.

McDonald’s said the new policy will be implemented across its U.S. supply chain within two years.

In the same announcement, McDonald’s said that it would this year begin offering milk jugs in its Happy Meals that contain milk from cows that have not been treated with the growth hormone rBST.

Public health advocates cheered the move, and some groups, including Keep Antibiotics Working, said it had been in “close dialogue” with McDonald’s about its policy change.

“This is a super-sized change for McDonald’s, and we’re lovin’ it,” said Pam Clough, organizer of US PIRG’s Stop Overuse of Antibiotics Campaign, in a news release. “They will signal to the marketplace a huge and growing demand for chicken raised without the routine use of antibiotics.”

Advocates say that a drawdown in use of antibiotics in poultry and livestock will help protect the effectiveness of antibiotics in humans. The Centers for Disease Control and Prevention reported in 2013 that antibiotic-resistant infections kill 23,000 Americans every year, warning that the nation faces “potentially catastrophic consequences” if it didn’t take action against the threat.

The overuse of the drugs is the strongest factor contributing to antibiotic resistance around the globe, the CDC said. The more a particular germ is exposed to antibiotics, the more rapidly it can develop resistance. The CDC said as many as half of all antibiotics prescribed are either unnecessary or used inappropriately. But the vast majority of drugs — by some estimates 80 percent — are used in livestock, to promote growth and treat disease. Consumer groups have pushed Congress and the Food and Drug Administration to tighten regulations on antibiotics given to animals, though the more urgent threat comes from medical treatment, the CDC said.

The restaurant’s change in food policy is the latest in a string of recent attempts to bring more transparency to how its food is made. McDonald’s has launched a series of digital films that is hosted by former “Mythbusters” co-host Grant Imahara to answer consumers’ questions about its menu items: How do you make the egg in the Egg McMuffin perfectly round? What exactly is in a Chicken McNugget?

It’s not clear whether these videos did much to bolster their image. For example, one showed that there were 19 ingredients in McDonald’s fries, a long list that included a kind of “anti-foaming agent.” Critics said that might not exactly be reassuring to diners looking for simple, natural foods.

The fast-food industry overall has been challenged by perceptions that its food is not healthy. According to research firm Technomic, sales were up just 1.2 percent at quick-service restaurants open more than a year in the third quarter, compared with a 7.9 percent increase in the fast-casual category and a 2 percent increase in the restaurant industry overall.

In its most recent quarter, McDonald’s saw traffic fall in all of its major markets across the globe, and its profit nosedived 21 percent.

To be sure, their recent business woes are about more than the perception that it does not serve healthy food. For example, McDonald’s executives have said its menu had become so bloated and complicated that it was slowing down wait times at drive-thru windows, and in turn, alienating customers.

After the rough year, chief executive Don Thompson announced in January that he would retire. He was replaced by Steve Easterbrook.

McDonald’s follows other chain restaurants in making a commitment to serve ethically-sourced food in response to customer demand, including Chick-fil-A and Panera Bread.