WASHINGTON — President Trump issued a threat on Wednesday to cut off American aid to any country that votes for a resolution at the United Nations condemning his recent decision to recognize Jerusalem as the capital of Israel.

Mr. Trump’s statement, delivered at a cabinet meeting in which he exulted over the passage of a tax overhaul, followed a letter to General Assembly members from the American ambassador to the United Nations, Nikki R. Haley, in which she warned that the United States would take note of countries that voted in favor of the measure.

“All of these nations that take our money and then they vote against us at the Security Council or they vote against us, potentially, at the Assembly, they take hundreds of millions of dollars and even billions of dollars and then they vote against us,” Mr. Trump said.

“Well, we’re watching those votes,” he added. “Let them vote against us; we’ll save a lot. We don’t care.”