JERUSALEM — Israel’s Supreme Court on Tuesday overwhelmingly rejected a 2017 law that would have allowed for the retroactive legalization of thousands of Jewish homes built on occupied West Bank land privately owned by Palestinians, a law so provocative that few believed when it was passed that it would survive judicial review.
The law, whose implementation was frozen because of a Supreme Court injunction issued shortly after it passed, would have paved the way for the wholesale expropriation of Palestinian-owned land in the West Bank on which nearly 4,000 homes had been built, both in authorized settlements and in illegal Jewish outposts.
Those homes — already viewed as illegal by most of the world under international law, for having been built in occupied territory — will now remain illegal under Israeli law as well, and Palestinian landowners will be able to proceed with lawsuits seeking to evict the people living in them and recover their property.
The ruling drew predictably divided responses from Israel’s polarized political class, with those on the center-left calling it a bold affirmation of judicial independence, and right-wing leaders calling it fresh evidence of why the legislature needed to grant itself the power to override Supreme Court decisions.
In its 8-to-1 ruling, the high court declared that the 2017 law was lopsidedly unfair, saying it sought to make legal “unlawful acts perpetrated by one specific population” — Jewish settlers — “while harming the rights of another,” the Palestinians.
It called the law an “arrangement which knowingly and unequally hurts only the ownership rights” of the Palestinians, “without giving sufficient weight to their special status” as the subjects of Israel’s military occupation of the West Bank.
The timing of the court’s ruling appeared carefully chosen, analysts said. It comes not long after the formation of a government following a yearlong political battle in which the powers of the judiciary were frequently a bone of contention between the vying parties.
Moreover, it came just weeks before Prime Minister Benjamin Netanyahu has vowed to forge ahead with the unilateral annexation of much of the occupied West Bank, a prospect that is raising tensions with the Palestinians, roiling Israeli society across the political spectrum and generating friction between Israel and much of Europe and the Arab world.
Amichai Cohen, a law professor and researcher at the Israel Democracy Institute, said in a statement that the court’s focus on the disparity in status between Israeli settlers and Palestinians living under occupation “should serve as a sign for caution” for those pursuing annexation.
He said that the 2017 law, which provided for compensation to Palestinian landowners who lost control of their property, had been meant to address problems created by settlers as well as the Israeli authorities who encouraged them over the years.
But Mr. Cohen said that the solution “cannot be to perpetuate additional violations against the rights of Palestinians, who are unrepresented in Israel’s decision-making institutions and also must be protected due to their status as a population inhabiting territory under military control.”
The law, which let settlers stay on private land if they had built there without knowing the property belonged to Palestinians or had done so at the state’s direction, was backed by Israel’s most right-wing governing coalition to date.
That coalition promoted a multitude of bills to accelerate what critics called the creeping annexation of West Bank land and make it far more difficult to create a Palestinian state. The law was considered so beyond the pale that Attorney General Avichai Mandelblit refused to defend it, forcing the government to hire outside counsel.
But Mr. Netanyahu was under enormous pressure from the right wing: His government had just carried out a court order to evacuate about 40 settler families at the Amona outpost, declared illegal a decade earlier.
Israel’s new government, by contrast, is of two minds on the Israeli-Palestinian conflict, with Benny Gantz, a centrist who struck a power-sharing deal with Mr. Netanyahu, holding a veto on most weighty decisions.
Mr. Gantz expended much of his political capital defending the Supreme Court. He said the 2017 law “should not have been passed in the first place,” and that his Blue and White party would ensure that the court’s rulings would be respected. “There will be no violation of the rule of law,” he said.
Still, Mr. Gantz has no veto over Mr. Netanyahu’s annexation plans under their agreement, and he has expressed qualified support for annexation of some West Bank areas.
Mindful of that, Dahlia Scheindlin, a left-wing political strategist, said that in rejecting the 2017 law, the court had actually shown how much the government that passed it had actually accomplished. “They got what they wanted,” she said. “They normalized annexation to the point that now we have a government openly embracing it.”
While many on the left welcomed the decision, they also expressed concern that some Palestinian landowners might not regain control of their property as individual lawsuits are decided on a case-by-case basis going forward.
Michael Sfard, a lawyer who represented some of the petitioners, noted that Palestinians’ efforts to recover their property could still be rejected on several grounds, including a statute of limitations on such claims.
And Hagit Ofran, who works in the Settlement Watch department of Peace Now, an advocacy group that supports a two-state solution, expressed concern that the ruling could add energy to proponents of annexation. The Israeli government enjoys power to confiscate private property in its sovereign territory that it does not enjoy in the West Bank, she said, so annexation might allow the sort of land grabs from Palestinians that the court’s ruling had just banned.
On the right, Mr. Netanyahu did not comment on the court’s ruling, but others in his Likud party urged the enactment of a law allowing Parliament to override the Supreme Court.
A sponsor of the overturned law, Bezalel Smotrich, a lawmaker now in the opposition, issued a warning. “Supreme Court judges: You should know that the fate of each dictatorship is to fall.”
And Naftali Bennett, leader of the right-wing Yamina party, called upon Mr. Netanyahu both to annex West Bank territory and to pass a judicial-override bill.
“I expect the prime minister to act,” Mr. Bennett said. “To apply sovereignty and legislate the override law. The rest is meaningless chatter.”
David M. Halbfinger reported from Jerusalem, and Adam Rasgon from Tel Aviv.