A group of travellers who settled on green belt land without planning permission have been given a year to leave the site.
Residents in the picturesque West Midlands village of Meriden have been campaigning to have the travellers evicted from the camp, in a field off Eaves Green Lane, since they arrived in May 2010.
The families were refused retrospective planning permission by Solihull Borough Council and yesterday lost a High Court appeal against the decision, which had been backed by Communities and Local Government Secretary Eric Pickles.
A second court hearing had been scheduled today for the council to seek an injunction to evict the travellers, but a compromise was reached late yesterday and the injunction hearing was called off.
The travellers now have until March 31 next year to leave the plot, and must return the land, near Solihull, to its former condition by April 30.
A council spokeswoman said: "Both parties came to an agreement that calls to a close what has been a long period of uncertainty.
"The agreement not only gives a firm date for the families living on the land to make an ordered vacation of the site, but also assures a speedy restoration of the land to its previous condition."
The presence of the traveller camp in the village led residents to form a pressure group named Residents Against Inappropriate Development (Raid).
Members of the group maintain a 24-hour vigil opposite the field to monitor the travellers and block the delivery of building materials to the plot.
Raid will be forced to dismantle its own makeshift camp - which consists of a small caravan, an awning and a wood burner - next month when an enforcement notice issued by Solihull Borough Council comes into force.
The residents have been told their temporary shelter constitutes an inappropriate development and must be removed by April 29.