CHANDLER, Ariz. (AP) — Joe and Sheila Papay look around anxiously as she slowly opens the door to the fluorescent yellow coop in their backyard, releasing nine scurrying chickens onto the lawn. Brown, spotted and black hens quickly fan out across their south Chandler lot. An orange Araucana claws in the dirt, hunting for an afternoon snack, as the Papays' two younger children scatter corn kernels. The couple talks about the legal troubles they're facing as a result of the chickens, an experiment that began last December with four hens. They wanted to be more eco-friendly and reap the nutritious benefits of farm-fresh eggs. Joe Papay, who's looking to see if any neighbors are watching over the wall, said they had no idea it's illegal to keep backyard chickens in much of Chandler. They're appealing a criminal charge and fighting to keep the birds they call pets. "We've got quite a force of people who are behind us and want chickens," he said of clandestine chicken owners in suburban Chandler. "It's like an underground society." Like many who've joined the growing ranks of backyard chicken farmers, the Papays are accused of running afoul of city zoning laws. Chandler code-enforcement officers say the family is violating an ordinance prohibiting chickens in most residential areas. Hundreds of Phoenix-area farmers have faced nuisance and zoning violations after neighbors have complained about smelly coops or clucking hens. Often complainants feel poultry poses a health risk or just doesn't belong near residences — claims chicken owners vehemently dispute. Similar cases across the Valley highlight the code-enforcement headache cities face as a result of a national movement toward urban agriculture. A push for locally raised, environmentally sustainable foods is clashing with more traditional expectations of how neighborhoods should sound, look and smell. Cities have approached the chicken-farming trend with varying degrees of resistance and acceptance. Proponents of the chickens say several cities, including Phoenix, Tempe and Scottsdale, have relatively friendly ordinances, meaning they don't prohibit the practice outright in residential areas. Other cities, such as Chandler and Glendale, take a far more restrictive approach. Both cities ban chickens in many neighborhoods, with exceptions for those with more rural or agricultural-type zoning overlays. But nearly every city bans roosters outright or implicitly because their crows would violate most any noise ordinance — and rattle neighbors hoping to sleep in on a Saturday morning. Phoenix requires owners to receive written permission from their neighbors or keep their coops at least 80 feet from the nearest home. It leads to sometimes delicate negotiations between annoyed neighbors and chicken enthusiasts, talks that can be smoothed over with baskets of fresh eggs or end in bitter code-enforcement fights. Patrick Ravenstein, Phoenix's code-compliance manager, said the city has noticed more people raising chickens in their backyards. The city reported about 540 poultry-related violations last year — a more than 65 percent increase from the number five years ago, according to a city database. Although city officials don't encourage or try to combat urban chicken farming, their goal is to get neighbors to communicate and compromise. Owners can often avoid citations by simply moving a coop to a different part of their backyard or making other adjustments. "You have two people with two different ways of life maybe trying to live in the same neighborhood," Ravenstein said. "It can be difficult. Sometimes people don't know their neighbors." Chicken owners and their supporters say it's a matter of fighting misconceptions. The Valley Permaculture Alliance, a group of urban-farming enthusiasts, has taken on the issue, attempting to persuade cities and the public that chicken farming, when done responsibly, is sanitary, economical and environmentally green.