Amona Outpost (Palestinian Territories) (AFP) - Residents of a wildcat settlement in the occupied West Bank agreed to a plan Sunday to relocate their hilltop outpost peacefully that could allow Israel's government to avoid a potentially violent stand-off.

The 40 families living at Amona northeast of Ramallah face a High Court order to leave the site by December 25 because it was found to have been built on private Palestinian land.

The approaching deadline led to a scramble to peacefully resolve the situation, with the settlers refusing to leave and several hundred hardline youths streaming into the outpost in recent days in support.

But after hours of debate, outpost residents approved a revised government proposal to relocate by a vote of 45 for and 29 against, a spokesman wrote on the outpost's Twitter account.

"After 20 years of pioneering settlements against all odds, and after two long years, we have decided to suspend the struggle," Amona residents said in a statement.

Prime Minister Benjamin Netanyahu had earlier pressured outpost residents to accept the deal, saying "we have done the maximum".

"Until dawn this morning we made very great efforts to reach an agreed solution on Amona," Netanyahu said at the start of a cabinet meeting.

The agreement, which would see residents moved to two nearby plots, still faces legal obstacles and possible derailment, however.

Young protesters who set up camp in the outpost's synagogue and built fortifications inside, including with chains and metal rods, filed out after the agreement was announced over the public address system, trudging down the hill and hitching rides.

Religious nationalist hardliners, who favour annexing the West Bank and oppose a Palestinian state, said they sympathised with the residents but regretted they had agreed to the plan.

"Given the way pressure was inflicted on them, I can only feel sorrow that they accepted Netanyahu's word when it has no value," Baruch Marzel, a follower of the late racist rabbi Meir Kahane, told reporters in the outpost after the deal was announced.

Story continues

- Obstacles remain -

In 2006, the demolition of nine permanent houses in the outpost led to clashes between settlers and Israeli security forces.

The dispute over whether to demolish the outpost has taken on international importance because of concern over settlement expansion in the West Bank, occupied by Israel since 1967.

All Israeli settlements in the West Bank, including annexed east Jerusalem, are seen as illegal under international law, but Israel differentiates between those it has approved and those it has not.

Settlements such as Amona are called outposts -- those that Israel has not approved.

Israeli settlements are seen as major stumbling blocks to peace efforts as they are built on land the Palestinians see as part of their future state.

Despite the prospect of forceable eviction by the army, the Amona residents had turned down a compromise deal on Thursday aimed at meeting their objections while also obeying the court ruling.

On Sunday, they were offered a new deal after an all-night meeting with Netanyahu.

The prime minister has been seeking a way out of an impasse which has put him between the court and the legal opinion of his own attorney general on one hand, and the anger of settlers who are a key part of his political constituency on the other.

Netanyahu will now need to go back to the court and ask for a stay of execution, probably 30 days, for the new plan to be implemented.

The agreement envisions moving 24 of the 40 families to a nearby parcel considered to be abandoned land. Another parcel would be reserved for the remaining families.

Amona residents said in their statement that the plan would see a total of 52 homes and public structures erected in the new areas.

But legal issues linked to the two plots could still pose problems.

Rights group Yesh Din said the Palestinian landowner of one of the plots in question was filing an appeal against the plan.