German Chancellor Angela Merkel on Sunday urged European Union nations to stick together in the face of emerging policy divisions with the US, Britain's decision to leave the bloc, and other challenges.

Speaking at a campaign event held in a Bavarian beer tent, Merkel suggested that the two-day G7 summit in Italy that ended on Saturday had served as something of a wakeup call.

G7 leaders were unable to reach unanimous agreement on climate change after US President Donald Trump said he needed more time to decide whether to back a key climate accord.

"The times in which we can fully count on others are somewhat over, as I have experienced in the past few days," Merkel told the crowd of some 2,500 that gathered to hear her and Bavarian governor Horst Seehofer.

OPINION: Angela Merkel is not the great progressive messiah

"And so all I can say is that we Europeans must really take our destiny into our own hands," she said, according to the DPA news agency.

Merkel emphasised the need for continued friendly relations with the US and Britain and stressed the importance of being good neighbours "wherever that is possible, including with Russia, but also with others."

"But we need to know we must fight for our own future, as Europeans, for our destiny," she said.

The day after a divided summit

Despite the Trump administration's talk of an "America first" policy and ongoing criticism of Germany for its massive trade surplus, the G7 leaders in Sicily did vow to fight protectionism, reiterating "a commitment to keep our markets open."

They also agreed to step up pressure on North Korea, to forge closer cooperation on security, and on the possibility of imposing more sanctions on Russia over role in the conflict in Ukraine.

However, while six of the seven G7 nations agreed to stick with their commitment to implement the 2015 Paris Agreement that aims to cut emissions and slow global warming, Trump said he needed more time to decide if the US would abandon the accord.

His administration has argued that US emissions standards are tougher than those set by China, India and others, and therefore have put American businesses at a disadvantage.

Backing out of the climate accord had been a central plank of Trump's campaign. Trump once proclaimed global warming a Chinese hoax.

Trump is "wide open" on whether to continue US support for the Paris climate accord, Defence Secretary James Mattis said in an interview aired on Sunday.

"I'm quite certain the president is wide open on this issue as he takes in the pros and cons of that accord," Mattis told CBS.

The comments from Mattis come after Trump tweeted on Saturday he would take a decision "next week" on whether to stick to or renege on the Paris accord.

After the G7 summit, Merkel called the climate talks "very difficult, if not to say, very unsatisfactory".

Merkel also complained after the meeting that there was resistance during the summit to drafting language that would have called for more measures to help refugees.