Trump also raised eyebrows by urging the G7 to once again become a G8 by bringing Russian Federation back into the fold and for criticizing his allies, including Canada, for what he called unfair trade barriers.
But Trump insisted it would be an "asset" to have Vladimir Putin back at the summit table.
Trump pulled out of President Barack Obama's landmark nuclear accord with Iran over the objections of European allies.
Fellow members of what was then the G8 suspended Russian Federation after it took control of Crimea from Ukraine.
But, he said, the USA could no longer tolerate "brutal" deals, even threatening to tear up the North American Free Trade Agreement if he didn't get his way.
"You know, whether you like it or not, and it may not be politically correct, but we have a world to run".
After the summit in Quebec, Trump headed to Singapore, four hours earlier than originally planned, to meet with North Korean leader Kim Jong-un.
Trump says he spoke with world leaders about his trade policies and called for the elimination of tariffs, trade barriers or subsidies.
French President Emmanuel Macron said the agreement would be a good first step and represented the G7 nations' desire to stabilize the situation.
Trudeau told Trump that it was "unacceptable" to cite national security when targeting a military ally like Canada.
GOP tries to win key spot in California governor's race
The jury deadlocked, but Republicans hope to use Menendez's legal troubles to tar other Democrats like Sherrill across the state. Braley's First Congressional District, which he had held since 2006 fell to a very conservative Republican, Rod Blum.
As the leaders met, Trump played a wild card, suggesting that rather than both sides boosting retaliatory tariffs - as he has just done on steel and aluminium - they could declare for entirely free trade in the G7 zone.
However, Peskov also stressed that no specific agreement had been reached about holding a summit between Trump and Putin. "And that's a very profitable answer, if we have to do it".
When a CNN reporter asked Trump about anger and frustration from U.S. allies over trade, he lambasted the reporter and his "fake friends at CNN".
Representatives from other G-7 countries said they felt like they had made progress in conveying their positions to Trump, something many of them felt pressured to do by voters at home.
The trade spat has dominated the meeting, with Canada and European leaders threatening retaliatory action in response to United States tariffs on steel and aluminum.
On 1 June, the United States imposed a 25% tariff for steel and 10% for aluminium on imports from the EU, Canada, and Mexico. He says gender equality must "cut through" everything the G-7 does.
President Donald Trump continued to blast "bad" trade deals with key United States allies as he left the G7 summit in Canada early Saturday, telling reporters that he would "fix" unfair trade relationships or end them.
Macron said he and Trump held "open and direct" discussions, adding that he thought there was a way to get a "win-win" outcome on trade, though details remained unclear.
The two-day session under crystalline blue skies in Charlevoix, Quebec, put Trumps transactional view of alliances, economic leverage and trade relationships into sharp focus for other nations often frustrated by Trumps ad hoc decision-making.