PARIS — The graveyards extend for miles, farther than the eye can see.

For a century now, parts of northern France and Belgium have been an eerie mausoleum, a landscape ravaged by trench warfare and the horrors of World War I, a conflict that was then the deadliest event in modern history.

More than 60 world leaders will gather in Paris this weekend to mark the centennial of the 1918 armistice. As host, French President Emmanuel Macron is embracing a post-national, pan-European understanding of the past — and vision of the future.

But the World War I centennial arrives at a moment when the European project and transatlantic alliance are under strain — and nationalism is seeing a startling resurgence.

Anti-European Union sentiment has grown even in countries where right-wing populists have performed poorly at the polls, and Brussels has struggled to respond to flagrant assaults on European values as basic as the rule of law.

Heads of state assert “Italy First,” “Hungary First” and “America First,” echoing language deployed by those who argued against U.S. involvement in the world wars and League of Nations.

And collective aversion to the term “nationalist” has begun to recede.

“You know, they have a word — it sort of became old-fashioned,” President Trump said at a rally last month. “It’s called a nationalist. And I say, really? We’re not supposed to use that word. You know what I am? I’m a nationalist, okay? I’m a nationalist. Nationalist. Nothing wrong. Use that word.”

Margaret MacMillan, a World War I historian at the University of Oxford, said the cavalier language evinces a mentality that peace is the default and even inevitable condition.

“We in the West, in particular, have been extremely lucky. We’ve lived through an extremely long period of peace,” she said. “The worry is that we take peace for granted and think it’s a normal state of affairs. We should reflect that sometimes wars do happen — and sometimes not for very good reasons.”

In advance of the gathering in Paris, Macron has positioned himself as Europe’s leading challenger to the rising tide of nationalism. He has said that leaders such as Hungary’s Viktor Orban are right to see him as their biggest opponents and warned — in an address to the United Nations — that unilateralism inevitably engenders “withdrawal and conflict.”

“A survival-of-the-fittest approach does not protect any group of people against any kind of threat,” Macron said.

French President Emmanuel Macron lays a wreath at the Notre Dame de Lorette war cemetery near Arras on Nov. 8, 2018. (Francois Mori/AFP/Getty Images)

Macron’s Armistice Day plans reflect his commitment to the postwar project. As envisaged by the French president, a ceremony Sunday on the Champs-Elysees will be a solemn affair, remembering lives lost rather than celebrating a war victory — much to the chagrin of some French conservatives. That will be followed by a three-day peace forum that aims to “strengthen multilateralism and international cooperation.”

If the event celebrates anything, it will be the long legacy of peace, which eluded the continent after the First World War but has now held more or less intact for seven decades. To Macron and other defenders of the European Union, the oft-maligned institution is a critical reason.

“The European Union is the rejection of the two world wars — that’s what it is. It’s a way of creating the economic and democratic stability that did not emerge after World War I,” said Yale University historian Jay Winter.

The degree to which the European Union’s post-nationalist vision has transformed the continent is evident in the German region of Saarland, an area of 1 million residents hard on the French border.

The region — marked by lush forests, gentle hills and rich coal deposits that once made Saarland an industrial jackpot — has changed hands eight times over the past 250 years. In the past century alone, it was traded between France and Germany four times.

The German Nazi army parades in Saarland after the region rejoined the German Reich in 1935. (AFP/Getty Images)

The first of those came in the aftermath of World War I, when France claimed the territory as compensation for German destruction of France’s own coal industry.

Germany lost the land again after World War II and only got it back in 1957.

As recently as the 1990s, the nearby border was subject to strict controls. But today, it’s largely invisible. French citizens commute to Saarland for work or pop by to buy a dishwasher. Germans cross into France for lunch or to pick up a bottle of wine. French — the language of the longtime enemy and occupier — is part of the fabric of Saarland, and it’s welcome.

“We’re neighbors. We’re friends. We marry each other. One hundred years ago, we killed each other. It’s been a great evolution,” said Reiner Jung, deputy director at the Saar Historical Museum in the region’s capital, Saarbrücken.

As Jung spoke, trench walls loomed overhead — not real ones but models built by the museum for its World War I exhibit to give visitors some feel for the conflict’s dominant battle motif. On the walls, the exhibit traces Germany’s descent into a war that would cost the nation 2.5 million of its own citizens.

World War I occupies a more limited space in the German historical imagination than it does for France, Britain or Belgium. Few of the battles were on German soil, and the horrors of the war that was to follow — World War II — overshadow all else in the nation’s historical memory.

But the lessons of both wars are woven into the country’s modern DNA. As other nations have swung toward populists pledging to look out for their own country’s interests — at the expense of everyone else — Germany has stayed relatively rooted in international cooperation.

French President François Mitterrand, left, and German Chancellor Helmut Kohl stand together during a French-German reconciliation ceremony in September 1984. (Pool/AP)

“Nationalism and militarism are not a good thing,” said Jung, whose museum is carved out of the basement of a castle badly damaged in Allied bombing raids. “We have to have understanding and respect for others. I hope we’ve learned that.”

Germany’s World War I commemorations were accompanied by little rancor. Although World War II sets off red-hot debates over whether the country can ever fully atone for its atrocities, the legacy of World War I is far less combustible, said Lucian Hölscher, an emeritus history professor at the Ruhr University Bochum.

“It’s a long time ago,” he said.

One measure of just how long: Unlike during other major anniversaries of the war, Germany has marked the centenary occasions alongside its onetime enemies. It will do so again Sunday, with Chancellor Angela Merkel traveling to Paris, and President Frank-Walter Steinmeier visiting London for a ceremony with Queen Elizabeth II.

“It has really been a European commemoration,” Hölscher said. “That’s something very new.”

Witte reported from Saarbrücken. Luisa Beck contributed to this report.