US President Donald Trump ended his time at the Group of Seven summit reiterating that the United States needed fair access to markets and an end to unfair trade practices.

“The United States has been taken advantage of for decades and decades,” Trump told reporters, adding he did not blame the allied leaders for the “unfair” trade deals.

“No tariffs, no barriers. That’s the way it should be. And no subsidies. I even said, ‘no tariffs,’” Trump insisted.

“We had extremely productive discussions on the need to have fair and reciprocal” trade, he said.

“We want and expect other nations to provide fair market access to American exports and that we will take whatever steps are necessary to [protect] industry and workers from unfair practices, of which there are many. But we’re getting them worked out, slowly but surely.”

The G7 leaders were scrambling to find a face-saving formula Saturday to counter the impression that the summit had served to only deepen the rift between Trump’s Washington and its traditional allies.

The text of the annual G7 joint communique is usually all but final before the leaders meet for two days of glad-handing and group photo opportunities, but this year officials were still negotiating behind closed doors as Trump prepared to leave.

According to a White House source, the parties had not given up hope that language can be agreed before Trump flies out of Quebec – but he would not deny reports that the US was objecting to the phrase “rules-based international order”, a formerly uncontroversial concept for a group of friendly countries set up in 1975 to promote that very idea.

If the G7 fails to agree a final communique – or if any compromise language is watered down too far for the sake of appeasing the “America First” economic nationalist agenda – Canada’s G7 will be remembered mainly for fierce disagreements over Trump’s unilateral trade tariffs and his surprise request to return Russia to the fold.

Earlier, as diplomats wrangled in private, summit host Prime Minister Justin Trudeau gathered the other leaders for a breakfast session on women’s equality.

Trump arrived 17 minutes after the planned 8am start time and after Trudeau’s opening remarks. He was seated next to a luminary of the multilateral system, IMF director Christine Lagarde.

But Trump was due to leave the summit early, barely two hours later, bound for Singapore and a historic nuclear summit with North Korean autocrat Kim Jong-un – and the clock was running down for any agreement on how to resolve a trade dispute that could yet spiral into a full-scale trade war that would split the western alliance.

Even before he flew out of Washington on Friday to hook up with the rest of the group, Trump managed to rile his counterparts by declaring that it was time that Russia be brought back into the G7. The idea was swiftly shot down.

With his wife Melania remaining at home in Washington, Trump cut a lonely figure on arrival at the golf resort in rural Quebec as he posed with his host Trudeau and his wife Sophie and other first couples.

A member of French President Emmanuel Macron’s team characterised the talks as “frank and robust”, with Trump first repeating his lengthy diatribe about what he regards as unfair trade restrictions – before the Europeans responded with their own gripes.

Sources in two European delegations said that Merkel was working on a proposal for a mechanism that would allow them to reopen a dialogue with the US on trade through a de facto working group that would develop mutually agreed statistics.

The German plan would aim to address the US claim that cheap aluminium and steel is causing a national security risk by threatening the viability of vital American industries – thus justifying Trump’s imposition of tariffs.

Trudeau told Trump that it was “unacceptable” to impose tariffs on national security grounds when he had a one-on-one with the US leader.

“The prime minister pressed the president to reconsider the US tariffs imposed on Canadian steel and aluminium, and encouraged him to work with Canada to address unfair trade,” Trudeau’s office said.

But Trump talked up the prospect that some kind of face-saving formula could be found.

“I think we’ll have a joint statement,” he said as he appeared alongside Trudeau.

Officials worked late into the night in an effort to reach an agreement, while the leaders enjoyed a campfire chat and a performance by acrobats from the Cirque du Soleil.

The summit is wrapping up just as Chinese President Xi Jinping begins hosting the leaders of Russia and Iran at a two-day regional security meeting in a symbol of the power play between East and West.

The G7 gathering is being held at a luxury resort more than two hours’ drive from Quebec City, where there have been several small and relatively trouble-free protests.

Trump’s courting of the US victims of globalisation was a major factor in his rise to power, and his willingness to break up multilateral agreements such as the Iran nuclear deal and Paris climate accord have also played well with his core support.

But allies who had grown accustomed to US leadership are now openly alarmed about the future under Trump.

“What worries me most is the fact that the rules-based international order is being challenged, quite surprisingly not by the usual suspects but by its main architect and guarantor, the US,” European Council President Donald Tusk said on Friday.