President Trump suggested Wednesday that billions of dollars in U.S. foreign aid could hinge on how countries vote on a U.N. resolution condemning his decision to recognize Jerusalem as Israel’s capital and move the U.S. Embassy there.

In a Cabinet meeting at the White House, Trump said he would be “watching those votes” in the General Assembly when it meets in emergency session Thursday on the U.S. decision.

“They take hundreds of millions of dollars and even billions of dollars, and then they vote against us,” he said. “Well, we’ll be watching those votes. Let them vote against us; we’ll save a lot. We don’t care.

“But this isn’t like it used to be, where they could vote against you, and then you pay them hundreds of millions of dollars and nobody knows what they’re doing.”

He ended by asserting, “We’re not going to be taken advantage of any longer.”

Palestinians place on the ground a representation of a U.S. flag during a protest Dec. 20, 2017, against President Trump’s decision to recognize Jerusalem as the capital of Israel. (Mussa Qawasma/Reuters) )

Trump’s remarks came after Nikki Haley, the U.S. ambassador to the United Nations, warned on Twitter that “the US will be taking names” of countries that support the resolution. And in a letter she sent to more than 180 U.N. ambassadors of member nations, she said she would report back to Trump on how they voted.

“We will take note of each and every vote on this issue,” she wrote.

The hardball tactics used by Trump and Haley further raised tensions over the U.S. announcement on Dec. 6 to unilaterally recognize Jerusalem as Israel’s capital and begin preparations to move the U.S. Embassy from Tel Aviv. Israel, which captured the eastern part of the city in the 1967 war and annexed it, considers the city its undivided, eternal capital. The Palestinians want to make East Jerusalem the capital of a future Palestinian state, and all countries that have diplomatic representation in Israel maintain their diplomatic missions in Tel Aviv to avoid taking a stand on the Jerusalem issue.

On Monday, the United States exercised its Security Council veto to block a resolution on the council declaring Jerusalem a final-status issue to be determined through negotiations and urging countries not to relocate their embassies in the city. All 14 other countries on the council, including U.S. allies Britain and France, supported the resolution.

Now, the nonbinding resolution is going to the General Assembly, where the United States does not have veto power.

In her letter to the U.N. ambassadors, Haley said the United States is not asking other countries to move their embassies to the city, “though we think it would be appropriate.”

“We are simply asking that you acknowledge the historical friendship, partnership and support we have extended and respect our decision about our own embassy,” she wrote.

Neither Trump nor Haley mentioned any specific countries that could be affected. Apart from Israel, only two other countries receive more than $1 billion in annual aid — Egypt and Jordan.

It is not clear whether the tough talk will swing any votes.

A spokesman for Haley said she had received positive feedback on her letter.

“Ambassador Haley has received numerous replies from ambassadors who are appropriately concerned about maintaining their friendships with the United States,” he said.

But the suggestion that U.S. aid would be linked to the U.N. vote was swiftly criticized by Turkey, which accused the White House of further isolating itself through its threats.

“We expect strong support at the U.N. vote, but we see that the United States, which was left alone, is now resorting to threats,” Turkish Foreign Minister Mevlut Cavusoglu said before leaving Istanbul for New York. “No honorable, dignified country would bow down to this pressure.”

David Makovsky, a fellow at the Washington Institute for Near East Policy, said the principle of taking U.N. votes into account in bilateral relations is sound, but he questioned whether the emotional issue of Jerusalem should be the place to take a first stand.

“Do you start a new policy on a vote that has the most religious resonance in the Muslim world?” he said. “I’m not against the principle. But you have to apply it more with a scalpel than a sledgehammer, given the issue at stake.”

Aaron David Miller, a Middle East analyst at the Wilson Center, said Trump’s rhetoric appeals to his supporters.

“The administration is doubling down after the Jerusalem decision, playing on the president’s aversion to the U.N., to allies that don’t pay up and stand up in support of Washington, and on long-standing commitments to have Israel’s back at the U.N.,” Miller said. “Being tough in New York plays well with the base and squares with the president’s tough-guy image.”

This is not the first time Haley has vowed to note which countries vote with the United States at the United Nations. On her first day, she told reporters that “for those who don’t have our back, we’re taking names.”