The United States vetoed a U.N. Security Council resolution Monday intended to invalidate President Trump's decision to recognize Jerusalem as the capital of Israel.

While the vote was certain to fail because Washington has a permanent veto on the 15-member council, it further isolates Trump on the world stage on the issue.

The Egyptian-drafted text approved by the 14 other council members demanded "all States comply with Security Council resolutions regarding the Holy City of Jerusalem, and not to recognize any actions or measures contrary to those resolutions."

Trump reversed decades of U.S. policy when he said he would recognize Jerusalem as Israel's capital — a decision that will see the U.S. Embassy move there from Tel Aviv. Palestinians also claim parts of Jerusalem as the capital of any future state for them.

A successful resolution needs nine votes in favor and no vetoes by permanent members of the council: the U.S., France, Britain, Russia and China.

Ahead of the vote, U.S. Ambassador to the U.N. Nikki Haley told the security council at its monthly briefing Monday on the political situation in the Middle East that a sovereign nation has "every right" to decide where to put its embassy.

She said the resolution was "an insult" that won’t be forgotten.

Reacting to the veto, Israel's Prime Minister Benjamin Netanyahu took to Twitter to thank Haley and Trump for their support.

"You lit a candle of truth. You dispel the darkness. One defeated the many. Truth defeated lies. Thank you, President Trump. Thank you, Nikki Haley," he said.

Palestinian Authority President Mahmoud Abbas reiterated his previous comments that said that Trump's decision to recognize Jerusalem meant Washington had forfeited its ability to play a role in mediating a peace deal between Palestinians and Israelis.

More:Jerusalem Palestinians still seek Israeli citizenship despite Trump declaration

More:Palestinians protest Trump recognition of Jerusalem as Israeli capital