Under pressure from Group of Seven allies, U.S. President Donald Trump backed a pledge to fight protectionism on Saturday, but refused to endorse a global climate change accord, saying he needed more time to decide.
The summit of G7 wealthy nations pitted Trump against the leaders of Germany, France, Britain, Italy, Canada and Japan on several issues, with European diplomats frustrated at having to revisit questions they had hoped were long settled.
However, diplomats stressed there was broad agreement on an array of foreign policy problems, including the renewal of a threat to slap further economic sanctions on Russia if its interference in neighboring Ukraine demanded it.
"We are satisfied by how things went," said Italian Prime Minister Paolo Gentiloni, while acknowledging splits with Washington in some areas. "We do not disguise this division. It emerged very clearly in our conversations."
Trump himself hailed what he called "a tremendously productive meeting", saying he had strengthened U.S. ties with longstanding partners.
The president, who has previously called global warming a hoax, came under concerted pressure from the other leaders to honor the 2015 Paris Agreement on curbing carbon emissions.
Although he tweeted that he would make a decision next week, his apparent reluctance to embrace the first-ever legally binding global climate deal that was signed by 195 countries clearly annoyed German Chancellor Angela Merkel.
"The entire discussion about climate was very difficult, if not to say very dissatisfying," she told reporters. "There are no indications whether the United States will stay in the Paris Agreement or not."
Putting a positive spin on it, French President Emmanuel Macron said he was sure Trump, who he praised as "pragmatist", would back the deal having listened to his G7 counterparts.
"Only a few weeks ago, people thought that the United States would pull out and that no talks would be possible," said Macron, who, like Trump, was making his first G7 appearance.
Merkel, by contrast, was attending her 12th such gathering, and clearly believed she had overcome climate change scepticism at a 2007 summit, when she convinced the then U.S. President George W. Bush to pursue substantial cuts in greenhouse gases.
Disappointment over the Paris Agreement was countered by relief when Trump agreed on Saturday to language in the final G7 communique that pledged "to fight all forms of protectionism" and committed to a rules-based international trade system.
During his election campaign, Trump threatened unilateral tariffs on Mexican and Chinese goods and said he would quit the North American Free Trade agreement unless it was renegotiated to his liking. Earlier this week he called Germany "very bad" on trade because of its U.S. surplus.
In a tweet after his plane took off, Trump said he had had "great meetings on everything, especially on trade", highlighting the part of the communique which called "for the removal of all trade-distorting practices".
He made no mention of protectionism.
Meeting in a luxury hotel overlooking the Mediterranean sea, hosts Italy had hoped that the summit would focus on Europe's migration crisis and the problems of Africa.
The internal G7 divisions and a suicide bombing in Britain on Monday, that killed 22, overshadowed the Italian agenda, but on Saturday five African leaders joined the world leaders to discuss their continent's potential.
Niger President Mahamadou Issoufou urged the G7 to take urgent measures to end the crisis in Libya - the point of departure for hundreds of thousands of migrants looking for a better life in Europe. He also criticized them for not honoring aid promises to fight poverty in West Africa's poorest regions.
"Be it Niger, a transit nation, or the countries of origin, it is only through development that we will prevent illegal migration," Issoufou said.
The final communique was just six pages long, against 32 pages last year, with diplomats saying the leaders wanted a simpler document to help them reach a wider audience.
Security questions dominated discussions on Friday, with the leaders vowing to work harder to combat terrorism and calling on internet providers and social media firms to "substantially increase" efforts to rein in extremist content.
Speaking to U.S. servicemen and women at the end of the summit, Trump promised to defeat terrorism and said he had made "extraordinary gains to advance security".
The speech was the last engagement of his first foreign tour since taking office - a trip that took him to Saudi Arabia, Israel, the Palestinian Territories, Rome, Brussels and Sicily.
"I think we hit a home run no matter where we are," Trump said, before boarding his plane back to Washington.