Only a few months ago, the law was believed to have little chance of coming up for a vote. Even Prime Minister Benjamin Netanyahu, who was flying back from a meeting with Britain’s leaders as the law was being debated, seemed to oppose its passage for fear of further international censure.

The bill had been so contentious that the nation’s attorney general, who described it as unconstitutional and in contravention of international law, said he would not defend it in the high court, which seemed in any case likely to nullify it.

That is partly because the law applies to Palestinians and their property rights. Since Palestinians in the occupied West Bank are not Israeli citizens and cannot vote for candidates for Israel’s Parliament, or Knesset, critics of the legislation say it is inherently anti-democratic. Under the law, Palestinian landowners will be offered compensation for the long-term use of their property but will not be able to reclaim it.

But the bill gained internal momentum through several forces: Mr. Netanyahu is determined to show his support to the powerful settler movement, and is under pressure from hard-liners on the right and from corruption investigations that even his supporters say appear serious. That pressure intensified last week after Mr. Netanyahu’s government carried out a court order to evacuate about 40 settler families at the Amona outpost, declared illegal a decade ago.

“Today Israel decreed that developing settlement in Judea and Samaria is an Israeli interest,” said Bezalel Smotrich, a right-wing lawmaker, using the biblical names for the West Bank. “From here we move on to expanding Israeli sovereignty and continuing to build and develop settlements across the land.”