UK Prime Minister Theresa May has paid tribute to Canadian PM Justin Trudeau's leadership after a G7 summit which she described as "difficult".

President Donald Trump attacked America's closest allies in tweets after leaving the meeting in Canada.

He said Mr Trudeau was "very dishonest and weak" and "acts hurt when called out".

The summit was seen as an opportunity to overcome disagreements on new tariffs imposed by the US on imports.

"I want to pay a particular tribute to Prime Minister Trudeau for his leadership and skilful chairing, which enabled us after two days of negotiation between leaders to agree actions and a shared approach on some of the most pressing challenges facing the international community and our citizens," she told parliament.

Mr Trump's advisers said the US president believed he had been stabbed in the back by Mr Trudeau over US tariffs.

His anger appears to have been sparked by a news conference Mr Trudeau gave after the summit, in which he described as "insulting" the way the US cited national security as a reason for the tariffs.

"Canadians, we're polite, we're reasonable, but we also will not be pushed around," he said.

Mr Trump also responded by announcing that he was backing out of a joint communiqué on trade between the US and its main allies.

Mrs May said she made clear to Mr Trump that the US levies were unacceptable - but she underlined the need for dialogue to stop the dispute from escalating.

"This was a difficult summit with, at times, some very candid discussions.

"But the conclusion I draw is that it is only through continued dialogue that we can find ways to work together to resolve the challenges we face."

On trade, she said multilateral action was the way forward, not unilateral action against one's partners.

"So at this summit, we expressed deep disappointment at the unjustified decision of the United States to apply tariffs to steel and aluminium imports.

Mr Trudeau and the EU have vowed to take retaliatory action next month over US tariffs on steel and aluminium.

'Depressing'
German Chancellor Angela Merkel described Mr Trump's change of heart on the joint communiqué as "sobering and a little depressing". The French presidency had earlier condemned "fits of anger".

Mr Trump has consistently said that countries that have a trade surplus with the US are "taking advantage".

On 1 June, the US imposed a 25% tariff for steel and 10% for aluminium on imports from the European Union (EU), Canada, and Mexico. Mr Trump said the move would protect domestic producers that were vital to US security.

The EU then announced retaliatory tariffs on US goods ranging from Harley-Davidson motorcycles to bourbon. Canada and Mexico are also taking action.