WASHINGTON -- The Trump administration on Monday said it no longer considers Israeli settlements in the West Bank to be a violation of international law, reversing four decades of American policy and further undermining the Palestinians' effort to gain statehood.

Secretary of State Mike Pompeo announced that the U.S. is repudiating the 1978 State Department legal opinion that held that civilian settlements in the occupied territories are "inconsistent with international law." Israeli leaders welcomed the decision while Palestinians and other nations warned that it undercut any chance of a broader peace deal.

Pompeo told reporters at the State Department that the Trump administration believes any legal questions about settlements should be resolved by Israeli courts and that declaring them a violation of international law distracts from larger efforts to negotiate a peace deal.

"Calling the establishment of civilian settlements inconsistent with international law has not advanced the cause of peace," Pompeo said. "The hard truth is that there will never be a judicial resolution to the conflict, and arguments about who is right and who is wrong as a matter of international law will not bring peace."

The change reflects the administration's embrace of a hard-line Israeli view at the expense of the Palestinian quest for statehood. Similar actions have included President Donald Trump's decision to recognize Jerusalem as Israel's capital, the movement of the U.S. Embassy to that city and the closure of the Palestinian diplomatic office in Washington.

"The U.S. administration has lost its credibility to play any future role in the peace process," said Nabil Abu Rdeneh, a spokesman for Palestinian President Mahmoud Abbas.

The European Union warned of the potential repercussions in a statement following the announcement that did not mention the U.S.

"All settlement activity is illegal under international law and it erodes the viability of the two-state solution and the prospects for a lasting peace," said the statement from the 28-nation bloc. "The EU calls on Israel to end all settlement activity, in line with its obligations as an occupying power."

Even though the decision is largely symbolic, it could give a boost to Israeli Prime Minister Benjamin Netanyahu, who is fighting for his political survival after failing to form a coalition government following recent elections.

It could also spell further trouble for the administration's peace plan, which is unlikely to gather much international support by endorsing a position contrary to the global consensus.

The Netanyahu government was dealt a blow on settlements just last week when the European Court of Justice ruled products made in Israeli settlements must be labeled as such.

The 1978 legal opinion on settlements is known as the Hansell Memorandum. It had been the basis for more than 40 years of carefully worded U.S. opposition to settlement construction that had varied in its tone and strength, depending on the president's position.

The international community overwhelmingly considers the settlements illegal based in part on the Fourth Geneva Convention, which bars an occupying power from transferring parts of its own civilian population to occupied territory.

In the final days of the Obama administration, the U.S. allowed the U.N. Security Council to pass a resolution declaring the settlements a "flagrant violation" of international law.

Pompeo said that the U.S. would not take a position on the legality of specific settlements, that the new policy would not extend beyond the West Bank and that it would not create a precedent for other territorial disputes.

He also said the decision did not mean the administration was prejudging the status of the West Bank in any eventual Israeli-Palestinian peace agreement.

For Netanyahu, the welcome boost comes at a time when he has been weakened domestically by mounting legal woes and two inconclusive elections this year.

Unable to secure a parliamentary majority, Netanyahu is now anxiously waiting to see if his chief rival, Benny Gantz, can put together a coalition. If Gantz fails, the country could be forced into a third election, with Netanyahu facing the distraction of a trial.

Netanyahu's office released a statement saying the policy shift "rights a historical wrong" concerning settlements.

"This policy reflects an historical truth - that the Jewish people are not foreign colonialists in Judea and Samaria," it said, using the Israeli terms for the West Bank.

Gantz, meanwhile, applauded Pompeo's "important statement, once again demonstrating its firm stance with Israel and its commitment to the security and future of the entire Middle East."

Pompeo dismissed suggestions that the decision would further isolate the U.S. or Israel in the international community, though Jordan's Foreign Minister Ayman Safadi wrote on Twitter that the settlements hurt peace prospects. "We warn of the seriousness of the change in the U.S. position towards the settlements and its repercussions on all efforts to achieve peace," he said.

Shortly after Pompeo's announcement, the U.S. Embassy in Jerusalem issued an advisory warning for Americans planning to travel in the West Bank, Jerusalem and Gaza, saying, "Individuals and groups opposed to (Pompeo's) announcement may target U.S. government facilities, U.S. private interests, and U.S. citizens." It called on them "to maintain a high level of vigilance and take appropriate steps to increase their security awareness in light of the current environment."

Israel captured the West Bank and east Jerusalem in the 1967 Mideast war and quickly began settling the newly conquered territory.

Today, some 700,000 Israeli settlers live in the two areas, which are both claimed by the Palestinians for their state.

After the war, it immediately annexed east Jerusalem, home to the holy city's most important religious sites, in a move that is not internationally recognized.

But Israel has never annexed the West Bank, even as it has dotted the territory with scores of settlements and tiny settlement outposts.

While claiming the fate of the settlements is a subject for negotiations, it has steadily expanded them. Some major settlements have over 30,000 residents, resembling small cities and serving as suburbs of Jerusalem and Tel Aviv.

The Palestinians and most of the world say the settlements undermine hopes for a two-state solution by gobbling up land sought by the Palestinians.

Israel's settlement activities have also drawn attention to its treatment of Palestinians.

While Jewish settlers can freely enter Israel and vote in Israeli elections, West Bank Palestinians are subject to Israeli military law, require permits to enter Israel and do not have the right to vote in Israeli elections.

------

Associated Press writers Josef Federman and Ilan Ben Zion in Jerusalem contributed to this report.