The United Nations General Assembly overwhelmingly voted on Thursday to condemn President Trump's decision to recognize Jerusalem as Israel's capital.

The 128 member states of the UNGA voted to condemn Trump's move, with just seven other states joining the U.S. and Israel in voting against the resolution. There were 35 abstentions.

The vote was taken shortly after the U.S. ambassador to the UN, Nikki Haley, issued a strong warning to states who support the resolution -- reminding the General Assembly of the financial aid Washington provides to both the UN and many member states.

"We will remember it when we are called upon once again to make the world's largest contribution to the United Nations," she said. "And we will remember when so many countries come calling on us, as they so often do, to pay even more and to use our influence for their benefit."

Haley added that Thursday's vote "will make a difference on how Americans look at the U.N. and on how we look at countries who disrespect us in the U.N., and this vote will be remembered."

The resolution was co-sponsored by Turkey, chair of the summit of the Organization of Islamic Cooperation, and Yemen, chair of the Arab Group at the U.N.

Haley's threats -- both on the floor of the General Assembly and on Twitter -- drew sharp criticism from supporters of the resolution, who accused the U.S. of intimidation.

"This is bullying," Turkey's Minister of Foreign Affairs Mevlüt Çavuşoğlu said. "It is unethical to think that our votes are for sale."

Çavuşoğlu added that the U.S. "may be strong, but that does not make you right."

Trump’s decision, which he announced earlier this month during a speech ordering the State Department to begin moving the U.S. Embassy from Tel Aviv to Jerusalem, rankled many in the global community. Critics worry that the president’s words will inflame tensions throughout the Middle East and doom any hope of a two-state solution to the conflict between Israel and the Palestinians for control of Jerusalem.

Although Democratic and Republican presidents have long affirmed that Jerusalem is Israel's capital, Trump's declaration to move the embassy to Jerusalem on Dec. 6 departed from decades of U.S. policy, and international consensus, that the fate of Jerusalem should be decided through negotiations.

Israeli Prime Minister Benjamin Netanyahu said Jerusalem is Israel's capital regardless of the outcome of Thursday's vote.

The Palestinians sought the General Assembly vote after the United States on Monday vetoed a resolution supported by the 14 other U.N. Security Council members that would have required Trump to rescind his declaration on Jerusalem as Israel's capital and not move the U.S. Embassy there. The Palestinians claim east Jerusalem, home to key Muslim, Jewish and Christian holy sites, as their capital.

"In a few days the world will celebrate the birth of Christ," Palestinian Minister of Foreign Affairs Riyad Al-Malki said on Thursday. "But the lights will not be shining in Jersalem."

Despite the condemnation, the Trump administration isn’t caving to international pressure, with Haley serving notice that she "will be taking names" on who votes in favor of the resolution Thursday.

The Trump administration’s actions recalled to some veteran U.N. diplomats the runup to the Iraq war in 2002 when then-President George W. Bush launched a campaign against France and other opponents of military action who refused to support a Security Council resolution to authorize war. The resolution, which former British Prime Minister Tony Blair was pressing for and the U.S. backed, was withdrawn by Britain because it was certain to be defeated as a result of strong council opposition.

The Associated Press contributed to this report.