At a rain-soaked and chilly observance of Armistice Day at the Suresnes American Cemetery outside Paris on Sunday, President Trump praised the "American and French patriots" of World War I, in a speech that sharply contrasted with the overtly political tone of an earlier address by French President Emmanuel Macron.

Joined by senior military officials, members of Congress, and dozens of other world leaders, Trump began by introducing several veterans and noting that it was Veterans Day in America.

"Exactly 100 years ago today, on November 11, 1918, World War I came to an end," Trump said. "Thank God."

He urged Americans to remember the tens of thousands of Americans killed and wounded in the "grizzly horrors" of the war, including the "legendary Marines" known as the "Devil Dogs."

"Devil Dogs -- John Kelly knows that name very well, right John?" Trump said, looking toward his chief of staff, who served as a general in the Marine Corps.

Trump, who canceled a planned appearance at ceremonies on Saturday because of inclement weather affecting his security detail, also presented a flag to American Battle Monuments Commission (ABMC) head Maj. Gen. William M. Matz, Jr., "as a symbol of our nation's gratitude" to the agency for "memorializing our fallen heroes."

"We're also joined by another very special guest: a 13-year-old boy from the United States," Trump said. "Matthew is in the eighth grade, and he worked and saved all of his money for two years to make this trip to France. He wanted to be here in person to honor the American heroes of World War I. Matthew, thank you -- you make us very proud. You're way ahead of your time, Matthew."

Macron, the French president, had endorsed globalism and implied that Trump was unpatriotic in politically charged remarks at the Arc de Triomphe just minutes earlier.

Trump has proudly described himself as a nationalist who embraces an "America First" approach, and this summer, the president accused Macron, along with Canada, of hypocritically imposing "massive tariffs and creating non-monetary barriers" affecting the United States.

“Patriotism is the exact opposite of nationalism," Macron said at the solemn event, as Trump looked on stone-faced. "Nationalism is a betrayal of patriotism."

He added: “In saying ‘Our interests first, whatever happens to the others,’ you erase the most precious thing a nation can have, that which makes it live, that which causes it to be great and that which is most important: Its moral values.

WATCH: MACRON CRITICIZES NATIONALISM JUST BEFORE TRUMP'S REMARKS

"I know there are old demons which are coming back to the surface," Macron continued. "They are ready to wreak chaos and death. History sometimes threatens to take its sinister course once again."

Macron was not alone in using the occassion to take shots at Trump. In a veiled dig at the president's America-first policies and skepticism toward multilateral cooperation, German Chancellor Angela Merkel warned that "lack of communication and unwillingness to compromise" can have deadly consequences.

British Prime Minister Theresa May, another apparent target of Macron and Markel's remarks amid the dividing European Union and Brexit, was not in attendance on Sunday.

May, who visited France last week to commemorate the end of World War I, opted to attend a separate war memorial service in London. Thousands of people marched to central London's Cenotaph war monument, where members of the royal family and other top British officials had placed wreaths.

Chinese President Xi also was not at Sunday's ceremonies.

There were signs earlier in the weekend that the relationship between Macron and Trump has become frayed. On Saturday at the Élysée Palace, Trump seemed ill at-ease near Macron, who at one point patted Trump on the thigh without reciprocation.

At rallies and speeches throughout the year, Trump has said the U.S. -- by encouraging goods and services to be made domestically, insisting that European allies contribute more funding to their own national defense, and blocking illegal immigration -- can achieve greater prosperity.

WATCH: TRUMP TELLS NATO THE U.S. ISN'T THE WORLD'S PIGGY BANK

He has also sharply disputed arguments from Democrats that his support of nationalism emboldens white nationalists, saying those insinuations are themselves "racist" mischaracterizations of the concept of nationalism in international relations.

Meanwhile, French police detained three female members of the feminist activist group Femen for what they called "sexual exhibition" during the day's events.

One topless woman intercepted Trump's motorcade on the Champs-Elysees avenue, strutting onto the road and yelling "fake peacemaker" as the president's heavily-armored limousine and Secret Service SUVs passed quickly.

Russian President Vladimir Putin said that he didn't speak at length with Trump at the Paris events because they wanted to avoid interrupting the planned ceremonies, the Russian state-backed television network RT reported, but the two leaders plan to meet at the Group of 20 summit in Argentina later in the month.

Putin and Trump arrived separately at Sunday's events in separate motorocades, unlike several other world leaders who rode together. White House officials cited security considerations for Trump's travel arrangements.

Putin separately backed a plan by Macron to form a European army to "strengthen the multipolar nature of the world," according to RT.

But Trump was not a fan of the proposal. "President Macron of France has just suggested that Europe build its own military in order to protect itself from the US, China and Russia," he tweeted this week. "Very insulting, but perhaps Europe should first pay its fair share of NATO, which the US subsidizes greatly!"

Remembered for brutal trench warfare and the first use of chemical weapons, World War I pitted the armies of France, the British empire, Russia and the U.S. against a German-led coalition that included the Austro-Hungarian and Ottoman empires. Almost 10 million soldiers died, sometimes tens of thousands on a single day.

The U.S. came late to the war, in April 1917, but over 1½ years it became a key player and tipped the scales for the allies. At the war's end, the U.S. had 2 million troops in Europe and another 2 million ready to cross the Atlantic if needed, a force that turned the United States into a major military power.

With so many leaders in Paris, the commemoration also provoked a flurry of diplomacy on the sidelines, with conflict in Yemen and Syria among the hot-button issues.

On Sunday, Merkel met with the head of the United Nations, an organization born from the ashes of World War II, and the president of Serbia. It was a Serb teenager, Gavrilo Princip, who assassinated the Austro-Hungarian crown prince in Sarajevo in 1914 to set off events which led to the outbreak of war.

The Associated Press contributed to this report.