ELDRIDGE, Iowa — Sow 44733 had broken the shoulder of one of her pen mates, rousted another who was huddled in the corner and was chewing on the ear of a third.


Other sows in the pen sported abrasions, torn ears and bloody tail stumps — all souvenirs of her attentions.


It was that kind of behavior that led hog farmers like Tom Dittmer to isolate sows in individual stalls called gestation crates that are barely bigger than the pigs themselves.


“The reason the industry switched to crates wasn’t because we wanted to harm our animals,” Mr. Dittmer said. “We did it because we thought it was what was best for the animals.” The move also kept the price of pork reasonably low for consumers, he said.


This year, however, Mr. Dittmer and fellow hog farmers are under increasing pressure from corporate pork buyers and animal rights groups to return to the old way of doing things: putting sows in group housing. In the last week of September alone, three companies — Dunkin’ Donuts, ConAgra Foods and Brinker International, which operates Chili’s — announced that over the next decade, they would no longer buy pork derived from pigs housed in gestation crates.


This week, the Bruegger’s bagel chain joined them. That brought the number of fast-food companies and food retailers that have made such commitments this year to 32 — a stunning victory for the Humane Society of the United States, which has worked for years to persuade pork producers to make the change. The National Pork Producers Council said it did not know how much pork these companies bought but estimated it might be about one-fifth of the pork produced.


Farmers like Mr. Dittmer resent the tactics, saying they worry that the move will be unsustainably costly for them and result in soaring pork prices for consumers.


“What I don’t like is some big restaurant chain in Chicago that knows nothing about raising animals is telling us how to raise pigs,” said Glen Keppy, a retired pig farmer whose sons finish raising Mr. Dittmer’s pigs for market, referring to McDonald’s, which promised in February to stop buying pork from pigs born in gestation crates. “Would they tell Microsoft how to make computers?”


Research is mixed about which type of housing is best for the animals’ welfare, according to a review done by a task force convened by the American Veterinary Medical Association. But the Humane Society and other animal advocates maintain that housing sows in gestation crates is cruel.


Earlier efforts to convert the pork industry have had mixed success. Cargill, the nation’s third-largest pork processor, owns about one-quarter of the sows that produce pigs for the company and began putting them in larger group pens about a decade ago. Smithfield Foods recommitted to transitioning to pens last year, after first promising it would do so in 2007 and then changing its mind. Tyson Foods and JBS, the two other large processors, have refused to budge.


So the Humane Society — armed with graphic videos of workers abusing dead piglets and of sows in gestation crates so small they cannot turn around, suffering from shoulder lesions and nervous disorders — took its case to the big consumer brands. It accomplished in months what it had been unable to achieve in years of prodding the major processors.


But now some of the independent farmers who supply those processors are fighting back.


Pat Hord and his family have put windows in some of their barns in north central Ohio to let visitors see for themselves how their 18,000 sows fare.


“There is a lot of misunderstanding and misinformation about what we do and how pigs get bred in crates,” Mr. Hord said. “It’s not anyone’s fault. It’s just that no one is on the farm anymore.”


Mr. Dittmer recently invited a reporter for a tour of Grandview Farm, which was founded by his great-grandfather in 1917 and is now home to 6,000 sows that he often calls “my girls.”


“I’m nervous about this, I have to say,” Mr. Dittmer said as he began the tour. “I’m afraid of becoming a target for the animal rights people. But if I’m going to hand this on to the next generation, which is the plan, I feel like people need to understand why we do things this way.”


When Mr. Dittmer began farming with his father in the 1970s, he said, their 150 sows lived in pastures like most pigs at the time, taking shelter under individual huts in the glaring heat of summer and wintering in barns.