(Bloomberg) -- General Mills Inc. spent five years and built a special eight-story sorting facility to get rid of an ingredient that wasn’t in its cereal.

To ensure that that some varieties of Cheerios -- made from oats and thus naturally gluten-free -- didn’t contain even tiny particles of the protein that may have blown in from neighboring fields, the company dispatched a team of engineers to retool machines to sort 1 billion pounds of oats a year.

“It was not easy,” said Mike Siemienas, a spokesman for the Minneapolis-based food company, who declined to say what was spent on the effort. “We knew if we wanted to take our Cheerios gluten-free we needed to create our own system.”

The increasing demand for food "free from" certain items -- including gluten, antibiotics, pesticides or genetic modification -- is changing the way companies procure, process and package your food. Sales of such foods are poised to grow 15 percent, or $1.4 billion, in the U.S. between 2017 and 2022, according to Euromonitor data. The U.S. is the largest global growth market for the free-from trend as consumers seek to curb certain ingredients or additives from their diets.

Risking Obsolescence

Sales growth for North American packaged-food companies has slowed sharply since mid-2011, reflecting the shift in demand toward fresh and organic foods, Bloomberg Intelligence’s Kenneth Shea said in a July report. The S&P 500 Packaged Foods Sub Industry Index has tumbled 9 percent this year as industry stalwarts struggle to find the right formula for growth.

“We know that we have to continue to evolve,” said Kyle Lock, senior director of retail marketing at Garner, North Carolina-based Butterball LLC, the largest U.S. turkey producer. Without changing for consumers seeking other options “we risk some obsolescence, or at least some decline.”

While the food and beverage sector has grown 1.9 percent over the past year, “free-from” versions are growing faster, according to data from Nielsen. Products labeled antibiotic-free saw growth rates of nearly 20 percent, followed by soy-free at 19 percent and hormone and antibiotic-free at 15 percent.

“The health trend has been going for a while, but the challenge big packaged food companies have is how to make money out of it,” said Bloomberg’sShea. “A lot of companies are facing that identity crisis right now.”

Some of the largest food companies have taken steps to serve more discriminating customers. McDonald’s Corp., one of the world’s largest buyers of beef, plans to source more than 20 million of its Angus burgers in Canada over the next year from farms and ranches that have been certified sustainable. Tyson Foods Inc., the nation’s largest meat company, bought organic chicken producer Tecumseh Poultry LLC earlier this year. Ardent Mills LLC, the top U.S. wheat miller, has created “The Annex,” a unit that’s trying to find the future of specialty grains and plant-based ingredients.

The shift is not always easy -- General Mills faced an embarrassing early setback when it was forced recall gluten-free Cheerios because wheat flour got into a facility in California.

The U.S. Department of Agriculture approves antibiotic-free goods, whereas gluten-free is a Food & Drug Administration standard.

Dannon Cows

“Americans increasingly want to know what’s in the products they buy and how they’re made,” said Sergio Fuster, president of the U.S. yogurt division for Danone’s North American unit.

The maker of Dannon yogurt began reaching out to farmers eight years ago to identify ways to source non-genetically modified feed for cows. Since then, more than 65,000 acres of farmland have been converted to source the feed needed by the dairies, including grass and alfalfa, said Fuster.

The company’s Danimals brand, almost entirely transitioned to non-GMO, is among its best performers. Dannon’s market share in the kids segment grew by a third in the past three years to reach 41 percent in 2017.

Butterball sells organic and antibiotic-free products and recently expanded its all-natural products including turkey bacon, sausage and burgers to lure customers outside of the holidays, when demand for its poultry usually peaks.

Turkey Bins

Sales of the company’s antibiotic-free ground turkey in the 13-week period ending Aug. 12 were up 71 percent from the prior year, and now make up 17 percent of the total. Achieving this is a logistical juggling act -- its plant in Mount Olive, North Carolina, handles organic and antibiotic-free birds first thing in the day to ensure they don’t come into contact with the conventional products. There’s also different colored bins to store each type of meat to prevent mix-ups, said Jay Jandrain, the company’s chief operating officer.

“It’s a matter of storing and managing those materials -- that’s the tricky part, just as far as keeping them segregated,” Jandrain said. “If you’ve got a raw breast meat, you now have three different types of raw breast meat that you have to manage through the facility.”

Farmers who were ahead of the curve, meanwhile, are now finding themselves well positioned to profit from the boom in demand for more specialized products. In the late 1980s, John Gilbert started raising pigs on his farm in north central Iowa on pastures, with feed grown on site and without the use of antibiotics.

Ten years later, Niman Ranch Inc., a supplier of sustainably-raised meats for Chipotle Mexican Grill Inc., came looking for his product. Gilbert has slowly expanded as demand for antibiotic-free, naturally-raised pork has risen. He now sends about 200 pigs a year to market, about 30 percent more than 30 years ago, and hopes to increase by 50 percent in the next five years.

“There’s a lot of people who understand making a small investment in food pays dividends in health care costs down the road,” Gilbert said by telephone.

To contact the reporters on this story: Jen Skerritt in Winnipeg at jskerritt1@bloomberg.net;Megan Durisin in Chicago at mdurisin1@bloomberg.net;Craig Giammona in New York at cgiammona@bloomberg.net

To contact the editors responsible for this story: Simon Casey at scasey4@bloomberg.net, ;James Attwood at jattwood3@bloomberg.net, ;Anne Riley Moffat at ariley17@bloomberg.net, Tina Davis, Jonathan Roeder

©2018 Bloomberg L.P.