President Donald Trump delivered a sharp nationalist message and assailed "globalists" in remarks to the world's international body on Tuesday, while taking a notably moderate line on Iranian aggression in the Middle East.

"If you want freedom, hold on to your sovereignty, and if you want peace, love your nation," Trump said, as he called for stronger borders and new controls on migration. "The future does not belong to globalists. The future belongs to patriots. The future belongs to sovereign and independent nations."

The U.N. was founded in 1945 to foster international cooperation and understanding after the nationalist fervor that had plunged the globe into World War II. But Trump, who spoke in a monotone, stressed the value of national identity and argued that governments must defend their "history, culture and heritage."

"The free world must embrace its national foundations," he said. "It must not attempt to erase them or replace them."

Just as notable as his challenge to many of the world body's principles was what Trump did not say. Before an audience that had been primed for him to focus on attacks on Saudi oil facilities that the U.S. has said Iran was behind, Trump said relatively little about the Sept. 14 strikes. Secretary of State Mike Pompeo has labeled the attacks "an act of war."

Likely to the relief of his audience, which included European leaders who have been scrambling to find a way to avert conflict with Iran over its nuclear program, Trump did not repeat that bellicose phrase. Instead, he reiterated the distaste for military conflict he has demonstrated since he first ran for president. "Many of our friends today were once our greatest foes," Trump said. "The United States has never believed in permanent enemies. America knows that while anyone can make war, only the most courageous can choose peace."

"America's goal is not to go with these endless wars, wars that never end," he added.

Trump offered the world leaders and diplomats gathered before him little in the way of a clear path forward, and largely repeated prior broad-stroke complaints about Iran's "menacing behavior."

Trump's speech also restated his hope that diplomacy can denuclearize North Korea; he vowed to seek peace in Afghanistan even as America continues to fight the Taliban; and he again condemned the "socialist" dictatorship in Venezuela.

But his strikingly pat language on Iran appeared to be part of an effort to tamp down expectations of a strong U.S. response in defense of the Saudis. Instead, Trump called on Iran to give freedom to its people and engage in new talks with the United States.