European leaders grappled with the jolting reality of President-elect Donald Trump’s skepticism of the European Union on Monday, saying they might have to stand without the United States at their side during the Trump presidency.

The possibility of an unprecedented breach in transatlantic relations came after Trump — who embraced anti-E.U. insurgents during his campaign and following his victory — said in weekend remarks that the 28-nation European Union was bound for a breakup and that he was indifferent to its fate. He also said NATO’s current configuration is “obsolete,” even as he professed commitment to Europe’s defense.

Trump’s attitudes have raised alarm bells across Europe, which is facing a wave of elections this year in which anti-immigrant, Euroskeptic leaders could gain power. Most mainstream leaders have committed to working with Trump after his inauguration Friday, even as they have expressed hope that he will moderate his views once he takes office. His continued hard line has created a painful realization in Europe that they may now have to live without the full backing of their oldest, strongest partner. The European Union underpins much of the continent’s post-World War II prosperity, but skeptics have attacked it in recent years as a dysfunctional bloc that undermines finances and security.

“We will cooperate with him on all levels, of course,” German Chancellor Angela Merkel told reporters in Berlin. But she said Europeans will need to take responsibility for themselves.

“We Europeans have our destiny in our own hands,” she said.

1 of 33 Full Screen Autoplay Close Skip Ad × These Democratic lawmakers are boycotting Donald Trump’s inauguration View Photos They say they are declining to attend in protest of the president-elect’s worldview and his criticism of civil rights icon John Lewis, a congressman from Georgia. Caption They say they are declining to attend in protest of the president-elect’s worldview and his criticism of civil rights icon John Lewis, a congressman from Georgia. Rep. Don Beyer (D-Va.) Beyer tweeted: “I just told hundreds of my constituents that I will not be attending the Inauguration Ceremony this coming Friday.” John McDonnell/The Washington Post Buy Photo Wait 1 second to continue.

The full ramifications of a potential breakdown in transatlantic ties are so extensive, they are difficult to total. U.S. guarantees form the backbone of European security. The United States and the 500-million-people-strong European Union are each other’s most important trade partners. For decades, European nations and the United States have worked tightly together on issues of war, peace and wealth.

Trump appears skeptical that the European Union matters to American security or economic growth.

“People want their own identity, so if you ask me, others, I believe others will leave,” Trump said of the European Union in a weekend interview with the Times of London and Germany’s Bild newspaper. He said he did not care about the E.U.’s future. “I don’t think it matters much for the United States,” he said.

“You look at the European Union, and it’s Germany. Basically a vehicle for Germany,” Trump said, meaning Germany had used the free-trade bloc to sell its goods to the disadvantage of others. He added that Merkel had made a “very catastrophic mistake” in opening Europe’s doors to migrants and refugees.

And he offered no special credit to European nations for being long-standing U.S. allies, saying he will trust Merkel and Russian President Vladimir Putin alike at the outset of his presidency.

“I start off trusting both,” he said. “But let’s see how long that lasts. It may not last long at all.”

Trump offered mixed messages about the NATO defense alliance, which is dominated by the United States, calling it “obsolete” and saying it is “very unfair to the United States” that most nations are not meeting their voluntary defense spending commitments. “With that being said, NATO is very important to me,” Trump said.

(Sarah Parnass/The Washington Post)

The Kremlin embraced Trump’s comments, with a spokesman agreeing that NATO is obsolete. British leaders also welcomed Trump’s willingness to negotiate a trade deal in the wake of their nation’s departure from the E.U.

But among most U.S. allies, Trump’s attitudes “caused astonishment and excitement, not just in Brussels,” German Foreign Minister Frank-Walter Steinmeier told reporters Monday in Brussels, where he was meeting with other European foreign ministers at a previously scheduled gathering. Coming directly from a meeting with NATO Secretary General Jens Stoltenberg, Steinmeier said NATO had listened to Trump’s comments “with concern.”

The incoming U.S. president is the first American leader since World War II not to support European integration. The European Union has long been considered to be in the U.S. interest, since it created a unified market for U.S. businesses, provided a bulwark against communism during the Cold War and helped quell the bloody slaughter that cost U.S. lives, among others, in the first half of the 20th century. After the breakup of the Soviet Union, the European Union expanded eastward into formerly communist nations, a development that leaders there say helped bring rule of law and stability as they modernized their economies.

Steinmeier said Germany is trying to assess what U.S. foreign policy will actually be. For example, James Mattis, the retired Marine general nominated to be Trump’s defense secretary, offered straightforward support for NATO and skepticism of Russia at his confirmation hearing last week.

Other leaders said Europe’s future does not rise or fall based on attitudes in the White House.

“What we are looking for is a partnership based on common interests with the United States,” E.U. foreign policy chief Federica Mogherini told reporters. “We always like to be in good company, but we determine our policies by ourselves.”

Some analysts noted that after Britain’s vote last June to leave the European Union, support for the E.U. in other nations increased. They wondered whether Trump’s frontal challenge to the bloc might have a similar effect. But one said that if global instability rises as a result of Trump’s unpredictable policies, the stress could weigh on the already taxed European Union.

“Over the last decades, the United States has played a huge stabilizing role. And when this stabilizing role of the U.S. around the world falls away, because they’re doing transactional deals, that will create lots and lots of messes which will implicate European interests,” said Stefan Lehne, a former Austrian diplomat who now works at Carnegie Europe, a Brussels-based think tank.

One prominent U.S. advocate of European unity was concerned about Europe’s ability to weather the Trump tsunami.

As the European Union battles skeptical forces, “U.S. cheerleading and support has been welcomed,” outgoing U.S. Ambassador to the E.U. Anthony Gardner said last week. “If there isn’t someone like a [Secretary of State John F.] Kerry or an Obama . . . reminding people of the importance of the European Union, then there’s a vacuum.”

French leaders, who face tough presidential elections in April, also appeared to be scrambling to handle the fallout. Trump allies have expressed support for the anti-E.U., anti-immigrant National Front party, whose leader, Marine Le Pen, is doing well in opinion polls. Le Pen lunched in the basement of Trump Tower last week in the company of a man who has served as an informal conduit for Trump’s contacts with Euroskeptic European leaders, although the Trump transition team denied any formal meeting with the French politician.

“The best response is European unity,” said French Foreign Minister Jean-Marc Ayrault. “As with the case of Brexit, the best way to defend Europe is to remain united. This is a bit of an invitation that we are making to Mr. Trump. To remain a bloc. Not to forget that the force of Europeans is in their unity.”

But the most wishful approach to Trump’s declarations may have come from Luxembourg, where the nation’s top diplomat said he hoped Trump was still in campaign mode.

“One must hope that the statements of candidate Trump starting Friday will go in a different direction,” said Luxembourg’s foreign minister, Jean Asselborn. “If the risks are summed up, it would be very destabilizing, which is not in the interest of America.”

Stephanie Kirchner in Berlin contributed to this report.

Read more:

Trump officials might be expecting E.U. to fall apart this year

Meet the Donald Trumps of Europe

After Brexit and Trump, Europeans are liking the E.U. again

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news