European Union leaders on Saturday in Rome during a meeting on the 60th anniversary of the Treaty of Rome.Credit
Tony Gentile/Reuters

ROME — Proclaiming “Europe is our common future,” 27 leaders of the European Union signed a statement on Saturday in Rome declaring their commitment to integrating the Continent even as a series of crises has badly weakened the efforts and Britain prepares to leave the bloc.

The statement, known as the Rome Declaration and signed on the anniversary of the day the bloc’s foundations were laid 60 years ago, underscored the aspirations of a “unique union with common institutions and strong values, a community of peace, freedom, democracy, human rights and the rule of law.”

In a nod to reality, however, the leaders acknowledged that they were “facing unprecedented challenges, both global and domestic,” including “regional conflicts, terrorism, growing migratory pressures, protectionism and social and economic inequalities.”

The ceremony took place in a hall in Rome that was richly decorated in frescoes depicting scenes from the ancient world. It is the same room where the Treaty of Rome was signed on March 25, 1957, by six countries. That event helped lay the groundwork for today’s union.

Moments after signing, Christian Kern, the Austrian chancellor, raised his fists in triumph. A keynote speaker, Donald Tusk of Poland, the president of the European Council, recalled that his 60th birthday this month made him the “same age as the European Community,” a forerunner of the union, and a beacon for freedom and dignity for Poles during the Communist era, when “it was forbidden to even dream about those values.”

More than half my life I lived behind the Iron Curtain. It was forbidden to even dream about those values. That really was two-speed Europe.

But behind the pomp and ceremony were concerns about the prospect of the project’s failure — even its collapse. With Britain starting this Wednesday a two-year timetable to leave the union, Prime Minister Theresa May was absent from the gathering. And in a speech at the Vatican on Friday, Pope Francis warned the leaders that their union “risks dying” as nations, and citizens, turned inward.

Underlining the disaffection with the union, protesters took to the streets on Saturday afternoon, shutting down Rome neighborhoods and railing against European technocrats, capitalism and shadowy economic powers.

Met by a large police presence, they marched under a number of banners, including those of trade unions and left-wing parties. Smoke bombs went off, and tensions rose between protesters and officers, but the march did not degenerate into rioting. Tight security measures were put into place days before.

“Europe was a dream that has turned into a nightmare,” said Mario De Giorgi, 50. “We are Italians who want more rights and a better life, what we had before the euro.”

That single currency, the bloc’s flagship economic project, is viewed by many as unfairly benefiting countries like Germany while imposing painful austerity on others like Greece.

“The euro is a killer currency; it has destroyed the world,” said Chiriac Tiberiu, who said he was part of the Romanian branch of the Five Star Movement, an anti-establishment party. “Europe has to disappear and be replaced with something that guarantees real freedom,” he said.

There also is rising dissatisfaction with Europe’s claims to moral leadership on human rights since the introduction of tougher policies to limit the entry of refugees and migrants fleeing war-torn and poverty-stricken countries in the Middle East and Africa.

“Europe gave us 60 years of peace, so I felt I had to give something back,” said Mauro Armadi, 23, who had traveled to Rome from Taranto, in Puglia, to show his support for the treaty.

Tobias Lundquist, 26, who had traveled to Rome from Sandviken, Sweden, said, “With the European Union, we cast off our dark history and came together to solve problems at a table, not a battlefield.”

Mr. Tusk encouraged the demonstrators filling the streets of European capitals this weekend to connect with the bloc’s history to understand how far the Continent had come.

Since the signing of the treaty, which created important precursor institutions to the European Union, the bloc has more than quadrupled in size. It is the largest trading bloc in the world and the biggest donor of development and humanitarian aid; it has absorbed formerly Communist countries in Eastern Europe and has created a giant single market with more than 500 million consumers.

It has also knocked down barriers to freedom to travel and work in neighboring states, creating lifelong bonds across frontiers that were formerly guarded. Above all, the bloc’s founding idea of making war between nations with mutual self-interest unthinkable has held.

Yet the project is reeling from recent crises that helped push the British to vote to leave the bloc in a referendum last June. Britain’s rejection prompted concerns that populist leaders opposed to the European project could be on the cusp of taking power in other countries.

That threat was beaten back this month in the Netherlands, where the center-right party of Prime Minister Mark Rutte won more votes than Geert Wilders, who opposes the European Union.

Still, uncertainty remains over the outcome of the French presidential election in April, with a second round in May, and Germany’s elections in September.

But Jean-Claude Juncker, the president of the European Commission, the bloc’s executive body, said, “Let us not lose perspective.” As daunting as the challenges may feel today, he said, they were “in no way comparable to those faced by our founding fathers.” Europe, he said, had already “managed to achieve almost eternal peace.”

Gaia Pianigiani contributed reporting.

A version of this article appears in print on March 26, 2017, on Page A6 of the New York edition with the headline: E.U. Leaders Project Unity, Despite Concerns of Failure. Order Reprints|Today's Paper|Subscribe