Foreign Ministers of the Group of Seven nations agreed on Saturday to put pressure on those responsible for a violent power struggle in Libya, especially commander Khalifa Haftar, to avoid a military escalation, Germany's Heiko Maas said.

"We are agreed that we must use all the possibilities at our disposal to exert pressure on those responsible in Libya especially General Haftar, so that we avoid any further military escalation. We all agreed," he told reporters.

Each country would use its own channels, said Maas, adding that Italy and France had direct contacts with Libya. "The situation is very worrying and we cannot accept a further military escalation," Maas said after a ministerial meeting held in the French seaside resort of Dinard.

Italy's foreign minister said Haftar must listen to warnings from the international community to halt his advance on Tripoli.

"We have stated quite clearly what our position is," Enzo Milanesi told reporters after the G7 meeting of foreign ministers.

"We very much hope that he will take it into consideration. If this does not happen, we will see what can be done," he said.

G7 foreign ministers pose for a group photo on the second day of their meetings. From the left are: Japanese Foreign Minister Taro Kono, Canada's Foreign Minister Chrystia Freeland, Germany's Foreign Minister Heiko Maas, Britain's Director General for Political Affairs at the Foreign & Commonwealth Office Richard Moore, Italy's Foreign Minister Enzo Moavero Milanesi, US Deputy Secretary of State John J. Sullivan, French Foreign Minister Jean-Yves Le Drian and European Union High Representative for Foreign Affairs and Security Policy Federica Mogherini. (David Vincent/Associated Press)

The G7 ministers said they hope to seal joint commitments on a range of global challenges and lay the groundwork for August's G7 summit in Biarritz, France.

Diplomats from G7 countries, which includes the U.S., France, Canada, Japan, Germany, Italy and the U.K., were working on a joint statement on the fight against trafficking drugs, arms and migrants in Africa's troubled Sahel region, fighting cybercrime and stopping sexual violence against women in conflict zones, especially in Africa.

U.S. seeks support for Venezuelan policy

But U.S. officials said that points of discord will also be discussed. Deputy Secretary of State John J. Sullivan said that Washington will use the G7 forum to galvanize support in recognizing American-backed Venezuelan opposition leader Juan Guaido.

Many of today's greatest challenges are global and they can only be solved when we work together. That is why Canada stands united with its German, French, and Japanese friends. <a href="https://twitter.com/hashtag/G7?src=hash&ref_src=twsrc%5Etfw">#G7</a> <a href="https://twitter.com/hashtag/AllianceOfMultilateralists?src=hash&ref_src=twsrc%5Etfw">#AllianceOfMultilateralists</a> <a href="https://t.co/BbwToB8yKM">pic.twitter.com/BbwToB8yKM</a> —@cafreeland

Guaido has embarked on an international campaign to topple the socialist administration of Venezuela's president amid deepening unrest in the country, which has been plagued by nearly a month of power outages.

Washington seems to be at odds with Italy over its stance on the crisis-hit South American country as it is the sole G-7 state to not back Guaido.

The U.S. and Canada have pursued a pro-active stance on widening support for Guaido, according to French officials. But there has been widespread alarm after Guaido was stripped of immunity by loyalists of Venezuelan President Nicolás Maduro earlier this week.

"With Juan Guaido being stripped of his immunity ... we don't want the situation to escalate," German Foreign Minister Heiko Maas said in Dinard on Saturday.

"We are still of the opinion that free elections should take place during which Venezuelans can decide themselves who will lead the country," he added.

Italy has also irked EU and U.S. allies by becoming the first G7 member to sign up to a contentious Chinese plan to build a Silk Road-style global trade network, the trillion-dollar Belt and Road Initiative.