A farm near Guildford will retain an agricultural role after a deal was struck between the borough council and Surrey Wildlife Trust (SWT).
The future of Tyting Farm, in Chilworth, had been in doubt since the last agricultural tenancy ended there in June 2005.
Now a lease has been offered to SWT, which said it would graze cattle again and regenerate the farm's green areas.
The decision follows a campaign by the Save Tyting Farm group.
Guildford Borough Council received five new leaseholder bids after agreeing that the 115-acre (0.47sq-km) farm, in Halfpenny Lane, should be kept in public ownership.
Councillor Sarah Creedy said: "Tyting Farm is within the greenbelt and the Surrey Hills Area of Outstanding Natural Beauty and is heavily protected because of this.
"Our position has always been to safeguard it from the threat of inappropriate future development and ensure it has a viable future.
"We are keen to make sure there is an active presence on the farm before winter sets in."
SWT will now work alongside the HALOW Project, which plans to convert some of the farm buildings into assisted residential units for young adults with special needs.
The residents will be able to take up work opportunities as the farm becomes active again.
John Rigg, from the Save Tyting Farm campaign, said there had been "enormous public support for protecting this outstanding landscape of the Surrey Hills, keeping land in agriculture and preserving working farms owned by the council".