Waves of police on Wednesday surrounded a Jewish settlement in the West Bank deemed illegal by the Israeli high court and began dragging angry residents, sputtering curses and prayers, out of their mobile homes.

After years of delay, the evacuation of the hard-line Amona settlers commenced, as youths in skull­caps burned tires, hurled rocks, and pushed and shoved authorities, alternately taunting police and pleading with them to disobey their orders to empty the community.

The day’s bitter clashes transfixed the nation, as Jews evicted Jews, with the democratic state fighting to uphold the rule of law as religious, messianic settlers claimed the rule of God. The scenes played out live on television and the Internet, as Israeli politicians promised this would not happen again.

Even the settlers seemed to know that this may be a last eviction, saying that now President Trump would support them. They were zealous in their resistance, but there was more the feeling they had lost a battle — even a skirmish — and not a war.

Israeli society and its leaders have struggled since the 1970s with the growth of settlements in the occupied territories. The state always protects, often abets but sometimes thwarts the pioneers. Many Israelis withhold full-throated support, in part from fear of angering the Americans, and the rest of the world, which condemn the building as illegal or worse. There is the sense that big changes­ are coming.

The Israeli Supreme Court ordered the demolition of the village of 40 families in 2014 because it was built on land privately owned by Palestinians from the neighboring ­villages.

Many settlers and their supporters who climbed the rocky hill to defend Amona blamed Prime Minister Benjamin Netanyahu for the community’s imminent destruction.

As the thousands of police officers carried red-faced settlers and demonstrators from the homes, bulldozers idled down the hill, ready to knock down the cheap metal caravans, as well as playgrounds, vineyards, olive groves and a synagogue. 

The settlers said the government should have defied the court order or found a solution that would allow Jews to remain on biblical land that they believe was promised to them by God.

Settlers also said they hoped Amona would be the last of hundreds of settlements and outposts built in part on private Palestinian land to be evacuated.

“We will be the last to be dragged from our homes,” said Eli Greenberg, 43, a father of eight who was barricaded inside his family’s trailer on the bitterly cold mountaintop.

“Why give this land to the Palestinians, who preach nothing but hate and violence, and want to destroy Israel?” he asked, speaking by cellphone as police surrounded his home. “We feel good vibrations from Trump. This is the end of this terrible time.”

The razing of Amona and the eviction of its families has been more than a decade in the making. The long timeline underscored the political chal­lenges for Israeli leaders, who count on the support of 600,000 settlers now living in the West Bank and East Jerusalem but have feared U.S. condemnation under both Republican and Democratic leadership.

By the early evening, Israeli security forces­ had removed 20 families from their homes and arrested a handful of activists who had turned out to support the residents. 

Israeli police spokesman Micky Rosenfeld said 15 police officers had been lightly injured in scuffles with settlers and their supporters.

In an attempt to calm the settlers’ fury, Israeli leaders promised that the dismantling of Amona would bring renewed building in the West Bank. 

Last week, Netanyahu and Defense Minister Avigdor Lieberman announced that 2,500 new homes would be built in the West Bank. On Tuesday, in anticipation of the Amona ­clashes, they promised 3,000 more.

An announcement of 5,500 new homes would have brought swift, harsh condemnation from the Obama administration, which for eight years branded such building “illegitimate” and “an obstacle to peace” between Jews and Arabs.

The Trump administration has so far remained silent.

“This is a very difficult day,” Justice Minister Ayelet Shaked, a member of the ultranationalist Jewish Home party, said in an interview with the Israeli news site Walla. “We have tried and tried to prevent this from happening, but now we are watching 40 families being evicted from their homes.”

“But we need to remember that this terrible day will eventually bring about new building in the West Bank,” she said.

Shaked highlighted her party’s efforts to pass a bill now being debated in parliament that would retroactively legalize Jewish settlements, such as Amona, that were built on private Palestinian property.

Israel’s attorney general said the bill violates Israeli and international law and would probably be reversed by the Supreme Court. Netanyahu and the government vowed to pass it anyway.

Still, promises of new houses to come did little Wednesday to douse the anger of hundreds of young activists who had trudged up the hillside overnight to protect Amona’s residents and slow down the demolition.

Zvi Sukkot, a settler from the hard-line Yitzar community and an organizer with a bullhorn, said, “We are here to show everybody our strong Jewish connection to the land as told in the Bible.”

He didn’t blame former president Barack Obama for the evacuation; he blamed Netanyahu. But other settlers turned their eyes toward Trump as the new beginning.

“After eight years of Obama, who didn’t let us build, now we’ll say, ‘We will build and build,’ ” said Shilo Adler, who heads the Yesha Council, which represents the Jewish settlers in the West Bank.

“Now is history-making time,” Adler said. “This is the moment. This is when we tell Netanyahu: ‘This is what we want. This is why we elected you.’ ”

Adler said the settlers were seeking 100,000 new homes — which would at least double the Jewish population in the West Bank — on land the Palestinians seek for a future nation under the two-state solution.

Last month, after the Supreme Court’s eviction order was postponed one last time, the government announced that it had reached an agreement with the Amona settlers — a hefty payout and promises of another spot on the same hillside in exchange for a low-key, peaceful move.

But as the days wore on, residents of Amona saw no new community being built for them, and Israeli human rights groups filed additional legal petitions on behalf of Palestinians who claim to own that land, too.

The agreement broke down, and this week, the army gave the settlers 48 hours to leave peacefully.

Most of the world considers the Jewish settlements in the occupied West Bank to be illegal, not just those built on Palestinian private property. Israel disputes this.

Inside Amona, young Jewish men and women hunkered down in abandoned houses, barbed wire strung up around doors and windows. They climbed on top of the caravans, waving Israeli flags, and protesters screamed at the police, “Shame on you, this is the land of Israel” and “Jews should not evict Jews.”

In the neighboring Palestinian village of Silwad, the Arabs clapped and shook hands.

“It feels great to see settlers being taken off my land and their caravans removed. The court has done a good thing, although it has taken a long time,” said Ibrahim Yakoob, 56, a Palestinian farmer who is part owner of the land.

“The question now is whether I will be allowed to return to my land and farm it again,” he said. “I don’t think so. The ultimate suffering as a farmer is to see your land but not be able to use it.”

Eglash reported from Jerusalem. Sufian Taha in Jerusalem contributed to this report.