BERLIN — Western and Arab powers signed a wide-ranging agreement on Sunday to respect a U.N. arms embargo and stop providing military support to Libya's warring factions. But the gathering failed to persuade the rival sides to agree to a lasting cease-fire, as many had hoped.

“We agreed on a comprehensive plan forward,” German Chancellor Angela Merkel told reporters at the end of the summit. “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.”

The one-day summit, attended by many of the world’s most influential leaders, was the most significant attempt yet by the United States and Europe to remain relevant in Libya after years of watching from the sidelines.

The event, proposed in the summer, came to fruition only after Russia and Turkey — which support rival sides in the conflict — stepped up their military engagement to shape the future of the country.

But although Western leaders portrayed the summit and its agreement as a step forward, tensions in Libya appeared to be growing on Sunday, casting doubt on whether conditions politically and on the ground there are ripe for a cease-fire.

Both Prime Minister Fayez Serraj, the head of the U.N.-installed government in Tripoli, and eastern commander Khalifa Hifter, who launched an offensive on the Libyan capital in April, were in Berlin on Sunday. But they did not meet, underscoring the deep and lingering animosity that divides Libya.

“The difference between the parties are such a magnitude that they don’t speak to each other,” Merkel said. “They were not in the same room.”

Sunday’s agreement calls for all countries and parties involved in Libya to work toward a permanent cease-fire, primarily through a military committee with representatives from all sides. The agreement is to be presented to the U.N. Security Council, giving it greater weight.

The signatories included Secretary of State Mike Pompeo, the senior-most U.S. official to attend the talks, French President Emmanuel Macron, Russian President Vladimir Putin, Turkish President Recep Tayyip Erdogan and other top leaders from Europe, the United Arab Emirates and Egypt.

The communique calls on “all parties concerned to redouble their efforts for a sustained suspension of hostilities, de-escalation and a permanent cease fire.” It also calls on countries backing the warring factions to “refrain from any activities exacerbating the conflict or inconsistent” with the U.N. embargo or the cease-fire, “including the financing of military capabilities or the recruitment of mercenaries.” Nations breaking the arms embargo should face sanctions, the signatories agreed.

“We know that today’s meeting obviously will not solve all the problems of Libya,” Merkel said. “We wanted to give a new impetus.”

Pompeo said progress had been made toward a “full-fledged cease-fire,” but “there’s still a lot of work to do.”

“It’s a complicated battlefield,” he said.

It remains to be seen whether the countries driving one of the world’s most internationalized conflicts will set aside their ambitions and stop sending weapons and fighters, after having blatantly ignored the arms embargo for years.

Russia and Turkey view Libya as central to their economic and geostrategic ambitions in the Middle East and North Africa. Regional powers such as the UAE, Egypt and Saudi Arabia see Libya through the lens of ideology and counterterrorism — and they are wary of the growing role played by Turkey, which supports Islamists they despise.

Sunday’s communique, analysts noted, had been drafted and agreed upon by all of the parties involved in Libya’s war for more than a month.

“Throughout that time, they sent more weapons and mercenaries to Libya,” said Wolfram Lacher, a Libya scholar at the German Institute for International and Security Affairs. “So the words of heads of states doesn’t really count for much. There is no sign that the real positions of foreign meddlers have changed.”

There are indications the warring sides have used the lull in the fighting to bolster their positions. In the capital, pro-government militias have gained confidence with the arrival of hundreds of pro-Turkey Syrian fighters and a Turkish air defense system. In Hifter’s eastern stronghold of Benghazi, reports have surfaced of the arrival of new arms from abroad.

On the eve of the summit, pro-Hifter forces blockaded key oil ports in a show of strength, as Tripoli-based oil officials warned that production could halt within five days. Reports emerged Sunday of fighting in Tripoli, including heavy artillery.

The effort to end the spiraling chaos has been plagued by divisions among European countries and a lack of strong engagement by the United States and other Western powers.

Hifter’s forces swept across Libya and launched an offensive in Tripoli during the same week last year that the United Nations was holding a peace conference. His advance was met by silence from the international community, emboldening him, analysts said. Although Italy and other European powers backed the Tripoli government, known as the Government of National Accord, France backed Hifter, whom it views as Libya’s best hope. Italy and France have dueling economic interests in Libya, centered on oil and gas resources.

“We Europeans have been suffering internal divisions, and we have not been united enough,” E.U. foreign policy chief Josep Borrell told reporters.

Washington, too, sent mixed signals. Congress and the State Department have voiced support for the Government of National Accord, but President Trump endorsed Hifter’s offensive in April.

Kremlin-backed mercenaries joined Hifter’s forces on the front lines in September. Europe and the United States did not act against Russia, and in November, the Government of National Accord turned to Turkey for help. Ankara, which already was providing drones, weapons and military advisers, agreed to boost support.

The Tripoli government signed a deal with Turkey guaranteeing Mediterranean Sea oil and gas drilling rights. That angered Greece, Cyprus, the European Union and Egypt, all of which covet those resources.

Ankara is also poised to gain about $18 billion in contracts suspended after Moammar Gaddafi’s fall. Moscow, too, stands to gain billions in arms and construction contracts. It views Libya as a geostrategic asset and an ideological platform to undermine NATO, divide the E.U. and discredit the West, according to Jalel Harchaoui, a Libya analyst at the Clingendael Institute in The Hague.

 Even before Sunday’s communique, senior European leaders were calling for greater engagement and unity in Libya, especially to enforce the U.N. arms embargo.

 “The Europeans should be strongly engaged, much more than in the past, to control the arms embargo,” Borrell said.

Borrell and other top European leaders suggested sending European forces to Libya to monitor a truce.

 “First, we need to have a cease-fire,” U.N. Secretary General António Guterres said. “We cannot monitor something that does not exist.”