Countries embroiled in Libya’s complex civil war agreed on Sunday to respect a much-violated arms embargo and hold off on military support, the German chancellor Angela Merkel has said, amid reports foreign troops and weapons had been deployed to both sides.

Speaking from a landmark summit in Berlin, Ms Merkel heralded the meetings as “a success”, and added that participants had committed to push the warring parties to reach a ceasefire.

However, she admitted that Libya’s rival leaders Fayez al-Sarraj, who leads the recognised government in Tripoli, and eastern commander Khalifa Haftar did not meet face to face because the differences between them are “so great”.

Libyan media had earlier reported that in Berlin Mr Sarraj refused to see General Haftar, chief of the self-styled Libyan National Army (LNA), which launched an offensive on Tripoli in April and over the weekend seized several large oil export terminals.

World leaders from 11 countries flew to the German capital on Sunday to try to hammer out a solution to the bitter conflict that reached a crescendo this year amid foreign military meddling.

Protests against Turkey sending forces to Libya Show all 12 1 /12 Protests against Turkey sending forces to Libya Protests against Turkey sending forces to Libya A woman brandishing a rifle takes part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention AFP via Getty Protests against Turkey sending forces to Libya Libyan protesters gather during a demonstration against the Turkish parliamentÃ•s decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori ESAM OMRAN AL-FETORI Reuters Protests against Turkey sending forces to Libya Libyans and Syrians take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya Libyans wave a Turkish and a national flag during a rally in support of the UN-recognised Tripoli-based government (GNA), in the capital Tripoli on January 3, 2020. (Photo by - / AFP) (Photo by -/AFP via Getty Images) - AFP via Getty Protests against Turkey sending forces to Libya Turkish members of parliament vote to send Turkish troops to Libya. They passed a bill approving a military deployment to Libya aimed at shoring up the UN-backed government in Tripoli, at a time of intensifying international tensions over the conflict. The beleaguered Tripoli government has been under sustained attack since April by military strongman General Khalifa Haftar, who is backed by Turkey's regional rivals - Saudi Arabia, Egypt and the United Arab Emirates AFP via Getty Protests against Turkey sending forces to Libya Libyan protesters shout slogans during a demonstration against the Turkish parliamentÃ•s decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori ESAM OMRAN AL-FETORI Reuters Protests against Turkey sending forces to Libya Libyan protesters shout slogans during a demonstration against the Turkish parliamentÃ•s decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori ESAM OMRAN AL-FETORI Reuters Protests against Turkey sending forces to Libya Women carry pictures of killed soldiers as they take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya People raise a picture of Syrian President Basha al-Assad as they take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya People raise Syrian national flags as they take part in a demonstration held by Libyans and Syrians in the eastern Libyan city of Benghazi to protest against Turkey's prospective military intervention in support of the UN-recognised Tripoli-based government, on January 3, 2020. (Photo by Abdullah DOMA / AFP) (Photo by ABDULLAH DOMA/AFP via Getty Images) ABDULLAH DOMA AFP via Getty Protests against Turkey sending forces to Libya Libyans burn a picture of strongman Khalifa Haftar during a rally in support of the UN-recognised Tripoli-based government (GNA), in the capital Tripoli on January 3, 2020. (Photo by - / AFP) (Photo by -/AFP via Getty Images) - AFP via Getty Protests against Turkey sending forces to Libya Libyan protesters gather during a demonstration against the Turkish parliament's decision to send Turkish forces to Libya, in Benghazi, Libya January 3, 2020. REUTERS/Esam Omran Al-Fetori NO RESALES. NO ARCHIVES. TPX IMAGES OF THE DAY ESAM OMRAN AL-FETORI Reuters

Among those who attended were the Russian president Vladimir Putin, the Turkish president Recep Tayyip Erdogan, French president Emmanuel Macron, Italian premier Giuseppe Conte, British prime minister Boris Johnson and US secretary of state Mike Pompeo.

“We have embarked on a very arduous road. We agreed on a comprehensive plan forward,” Chancellor Merkel said after four hours of talks.

“We all agree that we should respect the arms embargo and that the arms embargo should be controlled more strongly than it has been in the past.”

UN secretary-general Antonio Guterres reiterated Ms Merkel’s words and warned that the proxy war in Libya was escalating to “dangerous” levels threatening the security of the entire region.

“I cannot stress enough the summit’s conclusion that there is no military solution to the conflict in Libya,” he told reporters in Berlin.

“I hope the commitments made today will contribute to a lasting solution to the Libya crisis. We need to have a ceasefire.

“We cannot monitor something that doesn’t exist.”

Germany hopes to implore foreign players to stem the flow of weapons and troops to rival factions in Libya, as well as to agree and enforce a ceasefire as a way of ending the bitter conflict.

The conference comes a week after Russia hosted emergency peace talks in Moscow in a separate but similar attempt to end the bloody conflict.

Libya has been ripped apart by an increasingly complicated civil war since the 2011 ousting and killing of long-time dictator Muammar Gaddafi.

The country is now roughly divided into two rival administrations, each backed by different nations.

Mr Sarraj, chief of the UN-backed Government of National Accord in Tripoli, is supported by Qatar and Italy but recently turned to Turkey for troops and weapons.

As many as 2,000 Ankara-backed Syrian rebels are thought to have flown to the Libyan capital in recent days to bolster local forces against General Haftar’s LNA.

Footage released on social media this week showed what appeared to be a new contingent of rebels on board a Libyan plane to Tripoli.

General Haftar’s forces, meanwhile, are backed by Egypt, Russia and the United Arab Emirates.

This is despite the fact the LNA launched an offensive on Tripoli in April, laying siege to the capital in an effort to capture it.

On Sunday, Libya’s National Oil Corporation said that guards under the command of General Haftar’s forces shut down two key oil fields in the country’s southwestern desert, following the earlier closure of all eastern export terminals. Only offshore fields and one smaller facility remain operational, the corporation said.

Chancellor Merkel also said that despite not meeting, Libya’s rival factions had agreed to name members of a military committee that will represent them at talks about a more permanent ceasefire.

Mr Guterres said that the committee would be convened “in Geneva in the coming days”.

The German foreign minister Heiko Maas said that “we know that today’s signatures aren’t enough”.

Boris Johnson stressed the need to bring an end to the fighting and for all parties to support peace talks “to determine a way forward for the Libyan people”.

Pope Francis offered his encouragement from the Vatican on Sunday.