Angry countries at the United Nations on Thursday defied White House threats to cut off foreign aid, as they voted overwhelmingly against President Donald Trump's decision to recognize Jerusalem as Israel's capital.

At an emergency special session of the U.N. General Assembly, 128 U.N. members voted in favor of a nonbinding resolution criticizing Trump for the move, while nine nations voted against it and 35 countries abstained.

But in blistering speeches preceding the vote, several nations made their fury clear not only with Trump's precedent-breaking announcement on Jerusalem earlier this month, but with threats from Trump and the U.S. ambassador to the U.N.,, Nikki Haley, who had tweeted that the U.S. would be "taking names" of countries backing the resolution.

Turkish Foreign Minister Mevlut Cavusoglu ripped those threats as "unethical" and "bullying."

"We will not be intimidated," said Cavusoglu, whose nation was a co-sponsor of the measure, along with Yemen. "You can be strong but that does not make you right."

Earlier in the day, Turkish President Tayyip Erdogan hit Trump about the aid threat, addressing the president by name.

"Mr. Trump, you cannot buy Turkey's democratic will with your dollars," Erdogan said in a speech in Ankara. "I hope and expect the United States won't get the result it expects from (the U.N.), and the world will give a very good lesson to the United States."

Palestinian National Authority Foreign Minister said in remarks to the General Assembly that the Palestinians "will not be threatened" and said there could be "dangerous repercussions" from Trump's decision on Jerusalem.

South Africa’s representative to the U.N. also ripped Trump’s decision — which broke with decades of precedent regarding U.S policy on the status of Jerusalem — as "not conducive to advancing a sustainable solution" concerning Middle East peace.

In speeches to the assembly, representatives from China, Malaysia and many other nations, also expressed their support for the resolution.

After the vote, Iranian Foreign Minister Javad Zarif took to Twitter to hit Trump and celebrate the adopted resolution.

"A resounding global NO to Trump regime's thuggish intimidation at #UN," he wrote.

Haley, in a scathing statement before the vote, said the U.S. would remember the vote and raised the issue of American financial support for the U.N.

"The United States will remember this day in which it was singled out for attack in the General Assembly for the very act of exercising our right as a sovereign nation. We will remember it when we are called upon to once again make the world's largest contribution to the United Nations," Haley said. "And we will remember it 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."

"America will put our embassy in Jerusalem," she said. "No vote in the United Nations will make any difference on that."

State Department spokeswoman Heather Nauert walked back Haley's threats later Thursday.

"The U.N. vote was not the only factor the U.S. would take into consideration in dealing with our foreign relations and countries who have chosen to vote one way or another," she said. "No decisions have been made."

Thursday’s special session was held at the request of several Arab nations after the U.S. voted on Monday to veto a U.N. Security Council resolution requiring Trump to rescind his decision to recognize Jerusalem as the official capital of Israel. The other 14 members on the Security Council voted in favor of the resolution.

On Tuesday, Haley had tweeted that "the U.S. will be taking names" of the countries that vote to support the resolution and that Trump had asked her to report back on the nations "who voted against us." She also penned a letter to most of the 193 U.N. member states, in which she warned the U.S. would retaliate against countries that vote in favor of the resolutions.

Trump, during a Cabinet meeting in Washington on Wednesday, said: "We're watching those votes. Let them vote against us."

"We'll save a lot," he said. "We don't care."