The 12-year battle over a ridgetop trail on Sonoma Mountain ended Tuesday in thunderous applause for county supervisors when they approved a deal allowing limited development in exchange for public access to most of the 240-acre McCrea Ranch.

"It has been contentious at times, but it is a testament to how the community can work together," said Sonoma Valley Supervisor Valerie Brown, shortly before about 60 people in the audience delivered a standing ovation.

Brown, who had inherited a legacy of lawsuits and acrimonious public meetings when she took office in 2002, said she was pleased to "put this issue to rest."

The McCrea Ranch transaction had long been cited by critics and supporters of open space purchases as an example of transactions that could go wrong.

In 1997, the open space district secured a conservation easement prohiting development on the ranch located near Glen Ellen. But when Tom McCrea went to sell the property, it was discovered that he had never returned a signed copy of the trail agreement, so work was halted in 2001. The county sued McCrea and the new property owners, the Maria Hansen Trust, which led to a tentative settlement in December 2005.

However, the settlement proposal provoked a new round of public meetings in the Sonoma Valley over how much development would be allowed by the new property owners.

The transaction supervisors finally approved on Tuesday allows the new owners to put one house and agriculture buildings on each of two parcels that total about 11 acres on the lower elevations of the ranch. The ridgetop's 22 acres will be conveyed to the Agricultural Preservation and Open Space district for trail use, while the middle expanse of 200 acres will remain under a conservation easement that prohibits any development.

Debate over details of the final settlement took 90 minutes as representatives of neighborhood groups, the Sonoma Mountain Preservation Association the Valley of the Moon Historic Association and the Bay Area Ridge Trails Council spoke in support or opposition to different aspects of the transaction.

Robert Heisterberg, representing the three dozen homeowners in the Sonoma Mountain Residents Community Association, said the neighbors were satisfied because agricultural uses of the privately owned parcels were limited to personal uses and commercial ventures are prohibited. The association had earlier raised objections to the tentative settlement.

Plans are for a 2.2-mile segment of trail for hikers, bicyclists and horseback riders across the McCrea Ranch from Jack London State Park and connecting several other properties protected by the open space district.