COLLEVILLE-SUR-MER, France — Standing on a sun-drenched bluff above the Normandy beaches, where 10,000 soldiers sacrificed themselves to a savage fusillade of gunfire and opened the way for Europe’s liberation in 1944, President Trump declared on Thursday, “We are gathered here on freedom’s altar.”

Seventy-five years after the D-Day invasion, the president, who has called into question America’s alliances around the world — including with countries that fought with the United States in Normandy — pledged fidelity to friendships “forged in the heat of battle, tested in the trials of war, and proven in the blessings of peace.”

It was Mr. Trump’s only reference to the importance of the Atlantic alliance, in a speech that dwelled on the service of D-Day’s American veterans. Dozens of them were seated behind him overlooking the white grave markers of fallen comrades, and Omaha Beach beyond.

Speaking gravely, with few of the ad-libs that usually pepper his speeches, Mr. Trump recounted stories of heroism and suffering, often in graphic terms. The veterans not only had vanquished Nazi tyranny, he said, but built the American century.