G7 leaders pledged Saturday to ensure Iran’s nuclear program remains peaceful in a joint statement between the US and European allies angered by Donald Trump’s pullout from an internationally-agreed accord.

The agreement, though, was short lived, as Trump announced he was pulling support for the statement just as it was released.

The statement, which also called for Israeli-Palestinian peace talks and a solution to the humanitarian crisis in Gaza, came at the end of a two-day summit in Canada that was dominated by a trade dispute between Trump and the other world leaders.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

“We are committed to permanently ensuring that Iran’s nuclear program remains peaceful, in line with its international obligations and commitments to never seek, develop or acquire a nuclear weapon” the leaders said in the statement.

“We condemn all financial support of terrorism including terrorist groups sponsored by Iran. We also call upon Iran to play a constructive role by contributing to efforts to counter terrorism and achieve political solutions, reconciliation and peace in the region,” the statement added.

The G7 group includes European heavyweights such as Germany, France and Britain who — along with the US — were all signatories to the 2015 nuclear accord which allowed for the lifting of sanctions on Iran.

After two days of often fierce arguments between the United States and both the summit hosts and Europe, the joint statement attempted to paper over their cracks.

But the attempts to convey at least a semblance of unity were undermined when Canada’s Prime Minister Justin Trudeau confirmed he was going ahead with his tariffs against the US in response to US moves against his country’s steel and aluminum industries.

Trump responded by deriding Trudeau as “very dishonest and weak” and said the US would not endorse the joint the statement.

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

The eight-page statement also included concern”about the Israeli-Palestinian conflict, especially in the light of recent events.”

“We support the resumption without delay of substantive peace talks between Israelis and Palestinians aimed at achieving a negotiated solution that ensures the peace and security for both parties. We stress the importance of addressing as soon as possible the dire and deteriorating humanitarian and security situation in the Gaza strip,” the statement read.

There was also an agreement to disagree on climate change in the wake of Trump’s decision to leave the Paris climate accord last year which further underlined the divide between the Group of Seven’s powerhouse and its six co-members.

During the summit, Trump was accused of seeking to undermine the “rules-based” international order but the final statement began by stressing “the crucial role of a rules-based international trading system” as well as a commitment to “continue to fight protectionism.”

But in an apparent nod to Trump, it also pledged to push for swift reforms to the World Trade Organization which the US president has said has been a “disaster” for his country.

“We commit to modernize the WTO to make it more fair as soon as possible. We strive to reduce tariff barriers, non-tariff barriers and subsidies.”

Speaking at a post-summit press conference, Trudeau acknowledged that there were major differences with Trump.

“What we did this weekend was come together, roll up our sleeves and figure out a consensus language that we could all agree to,” Trudeau said in the town of La Malbaie where leaders have been meeting since Friday morning.

“Obviously the president will continue to say what he says.”

Trudeau again denounced Trump’s decision to invoke national security concerns to impose tariffs on aluminum and steel as “insulting” to the Canadian war veterans who had fought alongside US allies.

And he said he told Trump “it would be with regret but it would be with absolute clarity and firmness that we move forward with retaliatory measures on July 1, applying equivalent tariffs to the ones that the Americans have unjustly applied to us.”

Trump left the summit early headed for his meeting with the leader of North Korea next Tuesday.

But in a tweet after flying out of Canada, the US president showed he was in no mood to back down in any trade dispute.

“The United States will not allow other countries to impose massive Tariffs and Trade Barriers on its farmers, workers and companies. While sending their product into our country tax free,” he said.

“We have put up with Trade Abuse for many decades — and that is long enough.”