WASHINGTON — In a speech to the Security Council explaining why the US had changed its longstanding policy Friday and abstained in a vote demanding a halt to all Israeli settlement activity in the West Bank and East Jerusalem — thus enabling the motion to pass — US ambassador to the United Nations Samantha Power signaled another significant shift by saying America recognized the Security Council’s consensus that “settlements have no legal validity.”

The US did not agree with every word of the resolution, Power said, and therefore had not voted in favor. But, she stressed, “we cannot stand in the way of this resolution” in the quest for “two states living side by side in peace and security.”

“The settlement problem has gotten so much worse,” she said, that it was now endangering that solution.

Continued settlement building “seriously undermines Israel’s security,” Power said. “The United States has been sending a message that the settlements must stop privately and publicly for nearly five decades.

Noting that Israel’s Prime Minister Benjamin Netanyahu has both hailed settlement expansion and said he seeks a two-state solution, she added: “One cannot simultaneously champion expanding Israeli settlements and champion a viable two-state solution that would end the conflict. One has to make a choice between settlements and separation,” she said.

Power stressed that peace would not suddenly come to fruition if every settlement were dismantled tomorrow, and criticized Palestinian actions that have hurt the prospects of an agreement between the two sides.

“We would not have let this resolution pass had it not also addressed counter-productive actions by the Palestinians,” she said, citing terrorism and incitement.

She also said the vote “does not in any way diminish our steadfast and unparalleled commitment to the security of Israel,” noting that Israel “faces very serious threats in a very tough neighborhood.”

She also said the US abstention did not suggest it was no longer committed to the two-state outcome it has long sought. “None of us can give up on a two-state solution,” she said.

Power said the US vote was “fully in line with the bipartisan history” of how US presidents have approached the issue for decades. To underline the assertion, she read a quote from President Ronald Reagan, in 1982: “The United States will not support the use of any additional land for the purpose of settlements during the transitional period. Indeed, the immediate adoption of a settlement freeze by Israel, more than any other action, could create the confidence needed for wider participation in these talks. Further settlement activity is in no way necessary for the security of Israel, and only diminishes the confidence of the Arabs that a final outcome can be freely and fairly negotiated.”

Designating Israel’s settlement of the West Bank “illegal” is unusual for an American official, as US policy has long avoided invoking international law.

According to veteran Middle East peace negotiator Dennis Ross, such a characterization undercuts the US negotiating position of seeking to keep in place the major blocs that Israel would seek to retain under any permanent accord in exchange for mutually agreed upon land swaps within Israel proper for a future Palestinian state.

“Since the Reagan administration, the US made a policy that settlements were a political issue and not a legal issue,” Ross told The Times of Israel in October 2015.

President Barack Obama twice bucked that tradition — once in his 2009 Cairo speech and again to the UN General Assembly that same year. However, the term he used in both those speeches referred to the “legitimacy” of the settlements.

Originally initiated by Egypt, Friday’s resolution was co-sponsored by New Zealand, Malaysia, Venezuela and Senegal, who stepped in a day after Egyptian President Abdel Fattah el-Sissi withdrew the measure amid pressure from Israel and President-elect Donald Trump.