German Chancellor Angela Merkel met Libyan military commander Khalifa Hifter in Berlin on Tuesday in a bid to advance efforts to secure a lasting cease-fire in Libya.

An administration backed by Hifter's forces controls most of Libya's east and south, while a U.N.-backed but weak government in Tripoli holds a shrinking area in the west, including the capital. A patchwork of armed groups and foreign countries support one or the other.

Hifter's forces launched an offensive in April 2019 to seize Tripoli but the operation has been at a military stalemate.

German Chancellor Angela Merkel listens to a debate on growing threats from far-right extremism at the German federal parliament, Bundestag, in the Reichstag building in Berlin, Germany, Thursday, March 5, 2020. (AP PhotoMarkus Schreiber)

German Chancellor Angela Merkel listens to a debate on growing threats from far-right extremism at the German federal parliament, Bundestag, in the Reichstag building in Berlin, Germany, Thursday, March 5, 2020. (AP PhotoMarkus Schreiber)

Last month, rival Libyan military officials met in Geneva, where the United Nations said they agreed to a draft cease-fire agreement that involved the return of displaced civilians to their homes. The fate of the draft agreement remains unclear.

The hoped-for cease-fire would solidify a truce brokered by Russia and Turkey that took effect in January and has been fragile at best. Low-intensity fighting and artillery shelling continue in Tripoli's suburbs.

Merkel hosted a summit in January of countries with an interest in Libya's long-running conflict. Those countries agreed to respect a much-violated U.N. arms embargo, hold off on military support to Libya's warring parties and push them to reach a full cease-fire. But violations of the arms embargo persisted.

Libyan Gen. Khalifa Hifter receives a book as a gift from the Greek Foreign Minister Nikos Dendias during their meeting in Athens, Friday, Jan. 17, 2020. The commander of anti-government forces in war-torn Libya has begun meetings in Athens in a bid to counter Turkey's support for his opponents. (AP PhotoThanassis Stavrakis)

Libyan Gen. Khalifa Hifter receives a book as a gift from the Greek Foreign Minister Nikos Dendias during their meeting in Athens, Friday, Jan. 17, 2020. The commander of anti-government forces in war-torn Libya has begun meetings in Athens in a bid to counter Turkey's support for his opponents. (AP PhotoThanassis Stavrakis)

At Tuesday's meeting with Hifter, Merkel stressed that there can be no military solution to the conflict and so “a cease-fire and progress in the political process, in line with the decisions of the Berlin conference, are necessary,” her spokesman, Steffen Seibert, said in a statement. He didn't detail Hifter's response.

Hifter's visit to Berlin was his second in recent months. He also met Merkel on the day of the January conference, as did the Tripoli government's Prime Minister Fayez Sarraj.

The Libyan commander visited Paris and met French President Emmanuel Macron on Monday.

German Chancellor Angela Merkel listens to a debate on growing threats from far-right extremism at the German federal parliament, Bundestag, in the Reichstag building in Berlin, Germany, Thursday, March 5, 2020. (AP PhotoMarkus Schreiber)

German Chancellor Angela Merkel listens to a debate on growing threats from far-right extremism at the German federal parliament, Bundestag, in the Reichstag building in Berlin, Germany, Thursday, March 5, 2020. (AP PhotoMarkus Schreiber)

A senior French official, speaking on condition of anonymity in line with the presidency’s customary practices, said Hifter committed to sign the draft cease-fire deal from last month, but noted that the commitment depends on the other side respecting the cease-fire.

Sylvie Corbet in Paris contributed to this report.

German Chancellor Angela Merkel arrives at the German federal parliament, Bundestag, at the Reichstag building in Berlin, Germany, Thursday, March 5, 2020 for a debate on growing threats from far-right extremism. (AP PhotoMarkus Schreiber)

German Chancellor Angela Merkel arrives at the German federal parliament, Bundestag, at the Reichstag building in Berlin, Germany, Thursday, March 5, 2020 for a debate on growing threats from far-right extremism. (AP PhotoMarkus Schreiber)