Grain-free canine diets began to gain traction in the wake of the 2007 recalls of pet foods contaminated with melamine from China, industry analysts said. By 2011, grain-free dog food accounted for 15 percent of sales in American pet specialty stores or, nearly $1 billion. By the end of 2017, it had exploded to 44 percent of the market, or nearly $2.8 billion in sales, and continues to grow, said Maria Lange, an analyst on the pet specialty industry for GfK, the global market research firm.

“Most pets are seen as fur babies,” she said, “so owners say, ‘Maybe my dog is allergic to grains, so just to be safe, I’ll feed him grain-free.’ But in some ways it’s a marketing ploy to catch the consumer’s eye.”

Bentley, a broad-shouldered, 95-pound golden retriever, had been wolfing down his grain-free pork and squash for years, for which his owners, Tracy and Chris Meyer of Phoenix, Md., paid about $80 a month.

“You look at the ingredients: peas, red lentils, green lentils,” Mrs. Meyer said. “They were near the top of the list. It looked like something I would eat, so I thought it would be all right.”

When Bentley started backing off his food, she thought it was because they had just moved to a new house. She switched flavors, added treats.

“Whether I was up at 5 a.m. or 8 a.m., he was already awake at the bottom of the bed, panting,” Mrs. Meyer recalled. “He started a honking cough. Then his stomach became distended. I took him out one time before going to the vet’s and he just stopped, had a bowel movement, and fainted, foaming at the mouth.”