German Foreign Minister Heiko Maas on Thursday said Libya's General Khalifa Haftar has agreed in principle to a cease-fire in the country.

Maas flew to Benghazi at short notice on Thursday for crisis talks with Haftar, who is the commander of eastern Libyan forces, ahead of Sunday's Libya conference to be held in Berlin.

"General Haftar has signaled his readiness to contribute to the success of the Libya Conference in Berlin and is willing to participate," Germany's Foreign Office said in a tweet. "He has repeated his commitment to observe the existing cease-fire," the tweet added.

Earlier in the week, Haftar refused to sign a cease-fire agreement in Moscow with his rival, Prime Minister Fayez Sarraj. Following the meeting with Maas, Haftar is now expected to join the Libya summit.

"It is a good message that he is willing to keep to the cease-fire," German Chancellor Angela Merkel said later on Thursday.

"At the Libya conference we must above all see that the weapons embargo is adhered to again, which is basically agreed by the UN but unfortunately not kept to," she added.

During his trip, Maas also was expected to speak on behalf of EU foreign ministers to Sarraj, who leads the UN-backed Government of National Accord (GNA). Sarraj will also attend the peace summit.

Read more: Germany, Russia see goals align amid tension in Middle East

"With the Berlin process, we have the best chance for a long time to start peace talks for Libya," said Maas ahead of his trip. "Our message is clear: No one can win this conflict militarily. On the contrary, a window now opens to free the conflict from international influence."

In an unexpected move, Haftar traveled to Athens directly after meeting Maas. Greece said they will block any peace deal in Libya unless an agreement between Libya and Turkey on maritime borders is scrapped, Greek Prime Minister Kyriakos Mitsotakis said on Thursday.

What is the Libya conflict?

Since the overthrow of long-standing ruler Moammar Gadhafi in 2011, Libya has been in a state of flux.

The internationally recognized GNA holds Tripoli, but since April, it has been under sustained attack by Haftar's Libyan National Army (LNA), which is supported by a rival administration based in the eastern city of Tobruk.

A cease-fire arrangement brokered by Russia and Turkey broke down on Tuesday with no obvious resolution to the impasse in sight.

Germany is hoping Sunday's Libya conference will pave the way for a political process and intra-Libyan negotiations on a post-war order under the aegis of UN Special Representative Ghassan Salame.

"I hope that the parties take this opportunity to take Libya's future back into Libyan hands," Maas said ahead of his trip.

This would require a readiness for a real cease-fire and the participation of both parties to the conflict in the dialogue formats proposed by the UN.

Participants at Sunday's peace summit are expected to include US Secretary of State Mike Pompeo, France's President Emmanuel Macron, Russia's President Vladimir Putin and Turkey's President Reep Tayyip Erdogan.

"Successful outcome would be — the primary issue there is the cease-fire," a senior US State Department official told reporters on Thursday. "Other things would be nice to have, but the imperative would be the continuation of a cease-fire," the official added.

Watch video 00:33 Libya's warring factions say ceasefire violated

ed,jsi/stb (AFP, dpa, Reuters)

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.