A compromise deal struck between the government and residents of the Amona outpost was overridden by the High Court on Wednesday, as justices accepted a Palestinian petition against relocating the settlers to an adjacent plot.

The decision came as police were evacuating the West Bank outpost, which the High Court has long determined was built on privately owned Palestinian land. The same court accepted Wednesday that the land earmarked by the government for the evacuated settlers also belongs to Palestinians.

In a final ruling in 2014, the High Court ordered the government to evacuate and demolish the hilltop community by December 25, 2016. But under fierce pressure from settlers and their Knesset supporters, the government in late December secured a 45-day extension from the court until February 8, after reaching an agreement with Amona residents that would see 24 of the outpost’s 41 families moved to an adjacent plot of land on the same hilltop, while the rest would relocate to the nearby settlement of Ofra.

But local Palestinians objected to the government plan, saying the adjacent plot was also privately owned.

Israeli human rights group Yesh Din then petitioned the High Court on behalf of the Palestinian claimants.

Earlier this month, the court issued a temporary injunction halting the construction of the new homes, complicating government efforts to find a solution for the settlers and avoid a possible violent standoff.

Last week, Prime Minister Benjamin Netanyahu’s Chief of Staff Yoav Horowitz said the Palestinians’ claim on the land nullified the compromise deal.

A man holds Israeli flag as Israeli security forces gather ahead of the evacuation of the illegal outpost of Amona, on February 1, 2017. (Miriam Alster/Flash90)

A man holds Israeli flag as Israeli security forces gather ahead of the evacuation of the illegal outpost of Amona, on February 1, 2017. (Miriam Alster/Flash90)

Instead, he said the Amona residents were offered new options: build a new settlement in the area, or relocate the entire community to Ofra.

Amona residents initially rejected the government’s counter-offer, saying that remaining on the contested hilltop was the cornerstone of the entire agreement.

But on Wednesday, a community spokesperson told The Times of Israel that residents would agree to relocating the entire settlement.

“In the absence any other option, the residents will accept the offer to establish a new settlement,” Ofer Inbar said.

Authorities were hoping the compromise deal could prevent a repeat of the violence that followed the destruction of several permanent buildings in the outpost in 2006, when the court similarly ruled that buildings were built on private Palestinian land.

On Wednesday, a week ahead of the February 8 deadline, thousands of unarmed police officers descended on the West Bank hilltop to carry out the evacuation and demolition orders.

Threats of clashes hung heavily over the evacuation as supporters of Amona set up makeshift roadblocks and other defenses intended to keep the army from advancing on the outpost, which was the scene of a violent melee during a 2006 partial evacuation.

Though not a repeat of the violent clashes a decade ago, Wednesday’s evacuation saw scuffles break out between police and young, pro-settlement activists protesting the evacuation.

On Wednesday evening, police said 20 officers were injured, and 12 protesters were arrested.