The developer of a controversial rock quarry west of Cotati has agreed to pay $240,000 in attorney fees for the opponents of his project if they prevail in their ongoing court challenge of the quarry.

The settlement, announced Tuesday, was reached between developer John Barella, the citizens group suing to block his Roblar Road quarry and Sonoma County, which approved the project three years ago.

Barella, the former owner of North Bay Construction, agreed to indemnify the county and pay an initial $170,000 to cover attorney fees for the plaintiffs, Citizens Advocating for Roblar Rural Quality.

The group last year won a favorable ruling in Sonoma County Superior Court, where Judge Elliot Daum struck down the county's approval, saying key parts of the project's environmental review were inadequate.

In such cases legal fees typically are awarded to the suing party if it prevails.

Barella and the county have appealed the case. If the lower court ruling is overturned, Barella would be reimbursed the initial $170,000 payment.

If the quarry opponents are successful at the appellate level, Barella would pay an additional $70,000 to cover their legal fees, said Holly Rickett, a deputy Sonoma County counsel.

The proposed 70-acre quarry was approved on a 3-2 vote by the Board of Supervisors in December 2010. It would produce about 11 million cubic yards of construction-grade rock, worth about $60 million, over at least 20 years.

But opponents have argued the environmental impacts — on water quality especially — were not sufficiently studied by the county. The quarry would be located adjacent to a long-closed former county landfill.

A hearing date before the appellate court is expected late this year or early next year, Rickett said.