JERUSALEM — A new Israeli law legalizing dozens of unlawfully built West Bank settlement outposts came under heavy criticism on Tuesday from some of Israel’s closest allies, as local rights groups prepared to ask the Supreme Court to overturn the measure.

Amid the uproar, the Trump administration remained quiet about the law - paving the way for further possible action by emboldened Israeli hard-liners ahead of a trip to the White House by Israel’s prime minister next week.

The law was “a first step in a series of measures that we must take in order to make our presence in Judea and Samaria present for years, for decades, for ages,” Israeli Cabinet Minister Yariv Levin said, using the biblical name for the West Bank. “I do believe that our right over our fatherland is something that cannot be denied.”

Get Breaking News Delivered to Your Inbox

The law, passed late Monday, sets out to legalize dozens of West Bank settler outposts built on privately owned Palestinian land. Proponents claimed the communities, home to thousands of people and in some cases decades old, were built in “good faith” and quietly backed by a string of Israeli governments.

But critics said the law amounts to legalized land theft. They also said it is legally problematic by imposing Israeli law on occupied land that is not sovereign Israeli territory and where its Palestinian residents do not have citizenship or the right to vote.

The Palestinians seek the West Bank and east Jerusalem, captured by Israel in the 1967 Mideast war, as parts of a future independent state. Most of the international community considers Israeli settlements illegal and counterproductive to peace. Some 600,000 Israelis now live in the two areas.

In Paris, Palestinian official Saeb Erekat said the law puts “the last nail in the coffin of the two-state solution” and accused the Israeli government of “trying to legalize looting Palestinian land.”

Secretary-General Antonio Guterres expressed “deep regret” over the bill, saying it was “in contravention of international law and will have far-reaching legal consequences for Israel.”

“The secretary-general insists on the need to avoid any action that would derail the two-state solution,” spokesman Stephane Dujarric said.

Some of Israel’s closest allies, including Germany, Britain and the Czech Republic, also condemned the legislation.

Germany’s Foreign Ministry said its faith in Israel’s commitment to a two-state solution was “deeply shaken.” Britain’s minister for the Middle East, Tobias Ellwood, said the law “damages Israel’s standing with its international partners.”

Jordan, a key Arab ally, said such “provocative acts” could “fuel the anger of Muslims and drag the region to more violence and extremism.”

Turkey’s tourism minister, Nabi Avci, visiting Israel as part of a reconciliation process, said he hoped Israel’s Supreme Court would make the “right decision” and strike down the law.

Prominent Israeli advocacy groups, including Peace Now, the Arab rights group Adalah, and the Association for Civil Rights in Israel, all announced plans to file legal challenges.

“There’s going to be a legal battle against this bill,” said Lior Amihai, spokesman for Peace Now.

Legal experts say the law is problematic and Israel’s attorney general has said he will not defend it in court. Netanyahu has also expressed misgivings, reportedly saying it could drag Israel into international legal prosecution, though in the end he agreed to support it. In December, the U.N. Security Council passed a resolution declaring settlements illegal.

Netanyahu missed Monday’s vote because he was flying back from a visit to Britain.

The International Criminal Court in the Hague already is conducting a preliminary investigation into Israeli settlement policy.

Palestinian President Mahmoud Abbas, in Paris for talks with French President Francois Hollande, said he would seek to fight the new law in international organizations.

“What we want is peace ... but what Israel does is to work toward one state based on apartheid,” Abbas said.

Yuval Shany, a law professor at Israel’s Hebrew University, said the Supreme Court will “most likely” strike down the law.

He said it generates “considerable problems,” including likely violations of property rights, infringement of human dignity and the attorney general’s opposition.

But he said the legal challenges could drag on, in part because the law lays out a gradual process for confiscating lands. He said it would take years for the outposts to be fully legalized, alongside the roughly 130 existing Israeli settlements that dot the West Bank.

In all, the law would legalize some 3,900 homes built on private Palestinian land - about 800 in unauthorized outposts and the remainder in recognized settlements. The original landowners would be eligible for financial compensation of 125 percent of the land’s value, as determined by Israel, or a comparable piece of alternative property.

It is hard to find a comparable international precedent for the Israeli action. In breakaway northern Cyprus, attempts by Turkish Cypriot authorities to issue ownership certificates for property seized from displaced Greek Cypriots have been struck down in European courts.

Netanyahu’s governing coalition is dominated by West Bank settlers and their political allies. The Jewish Home party, which has ties to the settler movement, put heavy pressure on Netanyahu to allow Monday’s vote after the court-ordered demolition last week of the illegal outpost of Amona. Jewish Home came under fierce criticism for failing to prevent the demolition and has vowed to prevent further court-ordered evacuations.

After repeated clashes with President Barack Obama over settlements, Netanyahu and his settler allies have become emboldened by Trump’s election.

The new U.S. president has signaled a much softer approach than any of his predecessors. Trump’s campaign platform made no mention of a Palestinian state, departing from two decades of American policy, his designated ambassador to Israel is a settler ally, and a delegation of settler leaders was invited to his inauguration.

Encouraged by these signs, Israel has announced plans to build more than 6,000 settler homes. Jewish Home has also called on Israel to annex the 60 percent of the West Bank where settlements are located.

According to Peace Now, which closely monitors settlement activity, officials are scheduled to meet Wednesday to push for an additional 1,200 settlement homes.

Israel’s future settlement plans could hinge on Netanyahu’s Feb. 15 visit to the White House.

Trump has not condemned any of the latest Israeli settlement plans. But last week, he signaled that he too may have his limits, saying that settlements “may not be helpful” to promoting peace.

Netanyahu is expected to try to reach understandings with Trump on how much settlement construction might be tolerated.

Naftali Bennett, head of the Jewish Home party, told Israel’s Army Radio that the goal of the bill was to create the same conditions in the settlements as in Israel proper.

“At the end of the day, behind all the talk there is a simple question: What do we want for the future of Israel?” he said.