President Trump on Wednesday threatened to cut aid to countries that oppose the U.S. at the United Nations, on the eve of a vote on a resolution criticizing his Israel policy.

“They take hundreds of millions of dollars and even billions of dollars, and then they vote against us,” Trump said Wednesday before a Cabinet meeting. “Well, we're watching those votes. Let them vote against us, we’ll save a lot. We don't care.”

That was a reiteration of a threat U.S. Ambassador to the United Nations Nikki Haley made Tuesday, in anticipation of an emergency session for the UN General Assembly to condemn Trump’s recognition of Jerusalem as the capital of Israel. It also follows Haley’s veto of a related UN Security Council draft resolution that she dubbed “an insult” to the U.S.

“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,” Trump said. “So, Nikki, that was the right message that you and I agreed to be sent yesterday.”

Haley issued the warning on Tuesday, after the UN scheduled a Thursday vote to condemn the idea of moving the U.S. embassy in Israel to Jerusalem.

“At the UN we're always asked to do more & give more,” she tweeted. “So, when we make a decision, at the will of the American [people], [about] where to locate OUR embassy, we don't expect those we've helped to target us. On [Thursday], there'll be a vote criticizing our choice. The U.S. will be taking names.”

Trump’s team has taken pains to argue that his recognition of Jerusalem as the capital of Israel shouldn’t hurt eventual peace talks between the Israelis and the Palestinians. Trump, as well as Secretary of State Rex Tillerson and other U.S. officials, emphasized that he left open the possibility of talks that result in a final status that allows a potential Palestinian state to make its capital in East Jerusalem.

“We recognize Jerusalem as the capital city of Jerusalem, but we are not changing or taking a position on the boundaries of sovereignty in Jerusalem, including geographic boundaries,” Ambassador David Satterfield told the State Department press corps in early December.

Palestinian officials maintain that Trump’s decision renders the U.S. a biased mediator in the dispute. Democratic and other international critics of the decision also worry that it has also undermined the possibility of meaningful negotiations.

Sen. Ben Cardin, the top Democrat on the Foreign Relations Committee, said Arab leaders wanted Trump to offer the Palestinians some diplomatic victory at the same time as the Jerusalem announcement.

“I take names at the United Nations when I think member states do things that are against Israel, that [are] irrational, etc,” the Maryland Democrat told reporters on Wednesday. “I think this vote should not be placed at the United Nations, I support the American position that this resolution shouldn't be passed. But the way the president handled the announcement makes it much more difficult to get the type of vote that we would like to see at the United Nations.”