BRUSSELS — A day after President Trump pulled out of a key climate agreement, declaring that he was fighting for “Pittsburgh, not Paris,” an international realignment was already taking shape Friday, as European and Chinese officials signed a raft of agreements to bind themselves tightly together.

The pullout left the United States as a global outlier, and, many European leaders and experts said, a severely diminished force in the world. And it gave China fresh weight in a newly unbalanced landscape where longtime U.S. allies are searching for stability.

Friday’s landmark moves came after German Chancellor Angela Merkel declared this week that Europe must stand on its own, and after she had a warm Berlin tete-a-tete this week with Indian Prime Minister Narendra Modi, an up-and-coming rival to U.S. global power.

“Today China and Europe have demonstrated solidarity with future generations and responsibility for the whole planet. We are convinced that yesterday’s decision by the United States to leave the Paris agreement is a big mistake,” European Council President Donald Tusk said Friday after meeting with Chinese Prime Minister Li Keqiang. But, he said, “strong transatlantic ties are far more important and far more durable than the latest unfortunate decisions of the U.S. administration.”

Li also said that China’s relations with Europe were more important than ever, given “destabilizing factors” in the world.

In a Brussels meeting last week, Trump blasted European leaders for their handling of defense spending, called for terrorists to be “humiliated” and bragged behind closed doors that he had already done more to fight terrorism than President Obama did in four years.

BRACING FOR LONG-TERM CONFLICT

The 3 1/2 days of meetings between Trump and the Europeans may stand as a turning point in an alliance that was born from the ashes of World War II, as Europe turns toward China and other economic partners it views as more stable. Many senior European officials were jolted by the talks, which started in the winding streets of Brussels and continued on to muggy Sicily. They said they had made a mistake by allowing themselves to be lulled by Trump’s more conventional-sounding Cabinet members.

“Anti-Americanism will bloom,” said Tomas Valasek, a former Slovak ambassador to NATO, now the head of the Carnegie Europe think tank. “It will be much harder to politically explain to the European publics that we would cooperate with the U.S. president, because Donald Trump has made himself so unpopular now.”

Now, many European officials say, they are steeling themselves for years of conflict with Trump, and searching for other partners in areas such as climate change, where the U.S. has become a roadblock. In other arenas, such as defense, Europeans are far more dependent on the American security umbrella, though they are scrambling to achieve self-sufficiency now that they fear the validity of U.S. guarantees.

The European message has been unusually tough.

“Nothing is renegotiable in the Paris accords,” France’s new president, Emmanuel Macron, told Trump in a five-minute phone call after Trump pulled out of the agreement, according to an official briefed on the conversation. “The United States and France will continue to work together, but not on the subject of the climate,” he was described as telling Trump.

And Friday, the French government redid the video the White House released to promote the decision, marking it up with comments that derided Trump’s reasoning.

It is a sharp comedown from eight days ago, when European hopes were high after the first leg of Trump’s trip abroad.

‘SHOCK-AND-AWE’ EFFECT

This account of Trump’s European visit is based on interviews with more than 10 EU diplomats, officials and people familiar with the trip. Many spoke on the condition of anonymity because they feared further strain with the U.S.

Trump touched down in Brussels on a Wednesday. After munching fine chocolates with the Belgian prime minister, Charles Michel, and locking with Macron in a white-knuckled handshake that the French leader later called “a moment of truth,” Trump rolled up on Thursday to dedicate NATO’s new headquarters.

Diplomats had been told that Trump would recommit the U.S. to the all-for-one, one-for-all principle of the defense alliance, which he had questioned on the campaign trail. But the president, who told the authoritarian leaders of the Middle East that he was “not here to lecture,” blasted America’s closest allies for being “unfair” to U.S. taxpayers. Standing in front of a twisted beam from the World Trade Center, Trump said they owed money to the alliance and offered no high-flown praises of the idealistic principles on which NATO was founded.

As the world’s cameras rolled, Luxembourg Prime Minister Xavier Bettel wiggled his eyebrows and leaned over to whisper to Macron. The normally disciplined Merkel later said it was all she could do not to make a face as Trump spoke, according to someone who traveled back to Germany with her.

“The United States has not been treated fairly,” Trump said, according to a senior European diplomat who took notes at the dinner. “It has been taken advantage of.”

“He clearly discarded the nice words for the shock-and-awe effect. And this he clearly achieved,” the diplomat said. “We saw it on everyone’s faces during the meeting.”

Trump also mixed domestic partisan politics into his comments, the diplomat said, an unusual step in the usually nonpartisan world of NATO. He was matched only by the Kremlin-friendly Czech president, Milos Zeman, who did something similar, according to the diplomat.

NATO Secretary General Jens Stoltenberg tried to put a bright face on the meeting at its conclusion, saying Trump sent a “strong signal” of commitment just by coming to NATO in the first place.

But others had a starkly grimmer conclusion.

“We have just witnessed President Trump putting an end to European-American relations,” said François Heisbourg, a French defense expert and past adviser to Macron.

“By talking about NATO as a transactional alliance,” he said, “it’s very difficult to rebuild that kind of inbuilt trust.”

The contention continued the next day in Sicily at the Group of Seven summit, where leaders implored Trump to stay in the Paris agreement. He refused to commit, leading a dejected Merkel to exit the talks with an unusually grim assessment.

The next day, she told a beer-tent rally in Munich that Europe “must take its fate into its own hands,” offering poor prospects for cooperation with Washington.