MAINZ, Germany — German leader Angela Merkel said it was "sobering and a little depressing" to see President Donald Trump withdraw from the G-7 agreement via Twitter after leaving the summit early.

It appeared Trump had agreed a fragile consensus with the other members of the G-7 — or Group of Seven, a club of industrialized nations — by agreeing to sign its official communiqué on a range of issues.

But the president blew that apart with a series of tweets from Air Force One, in which he criticized comments made by Canadian Prime Minister Justin Trudeau, who hosted the gathering in Quebec.

Trump, who left the meeting early to fly to Singapore for an unprecedented sit-down with North Korean leader Kim Jong Un, said he told his officials not to sign the communiqué.

Based on Justin’s false statements at his news conference, and the fact that Canada is charging massive Tariffs to our U.S. farmers, workers and companies, I have instructed our U.S. Reps not to endorse the Communique as we look at Tariffs on automobiles flooding the U.S. Market! — Donald J. Trump (@realDonaldTrump) June 9, 2018

PM Justin Trudeau of Canada acted so meek and mild during our @G7 meetings only to give a news conference after I left saying that, “US Tariffs were kind of insulting” and he “will not be pushed around.” Very dishonest & weak. Our Tariffs are in response to his of 270% on dairy! — Donald J. Trump (@realDonaldTrump) June 9, 2018

Merkel told German broadcaster ARD on Sunday that Trump's "withdrawal via Twitter is of course sobering and a little depressing."

She added: "I believe in win-win situations. Sometimes I have the impression that the American president believes only one side can win and the other loses. That is maybe the difference."

Merkel, who leads Europe's largest economy, said the president's tough talk on trade would not cow European powers.

"We won't let ourselves be ripped off again and again," she said. "Instead, we act then too."

Nevertheless, she vowed to continue to work on the often-fractious relationship with Trump's White House.

"This does not mean that I then do not try to find mutual grounds again," she added. "There remain good reasons to fight for the transatlantic partnership."

She added: "I admit that in some areas we did not achieve what we wanted [at the G-7], but this is not a reason not to talk any longer."

Trump went into the G-7 summit having riled its other members — Canada, Britain, France, Italy, Germany and Japan — on a number of geopolitical issues.

It appeared the club had managed to paper over these cracks until Trump sent his tweets. He said he was unhappy at an end-of-summit press conference by Trudeau after he left the summit, in which Trudeau said Canada would retaliate against U.S. trade tariffs.

Merkel was not the only one to criticize Trump's move.

German Chancellor Angela Merkel and International Monetary Fund Managing Director Christine Lagarde react as President Donald Trump arrives late for a breakfast meeting discussion on gender equality at the G-7 summit on Saturday. Neil Hall / EPA

"Anyone who leaves with their backs turned away shows incoherence and inconsistency," a French official said on condition of anonymity. "International cooperation can not depend on anger or small words. Let us be serious and worthy of our people."

Canadian Foreign Minister Chrystia Freeland said her nation "does not conduct its diplomacy through ad hominem attacks," Reuters reported.

Andy Eckardt reported from Mainz, Alexander Smith reported from London, and Nancy Ing reported from Paris.