Athens, Greece - Angered by its exclusion in Libyan peace talks to be held on Sunday in the German capital, Greece scored a diplomatic win when Libyan renegade military commander Khalifa Haftar paid an unexpected visit to Athens, on his way to the UN-sponsored talks in Berlin.

Greece asked to be included in the Berlin Process, as the event is called, saying it has vital interests at stake.

More:

The Council of Ministers in Tripoli signed a maritime jurisdiction agreement with Turkey last year that claims waters Greece also sees as part of its own jurisdiction.

Haftar's Libyan National Army (LNA), based in Benghazi, is at war with the UN-recognised Libyan Government of National Accord (GNA) led by Fayez al-Sarraj, based in Tripoli.

Nikos Dendias, Greek foreign minister, said Haftar on Friday agreed that a ceasefire deal had to recognise "the invalidity of the illegal memoranda between Turkey and the Sarraj government".

The Greek government says Haftar has committed to negotiating a new maritime deal with Greece.

"Since we are not [at the Berlin talks], we expect Germany, the host country, to be the guardian of the European position on Libyan matters," Dendias said.

The Berlin Process began in 2015, when Greece was out of favour in Europe.

That was when the left-wing Syriza government faced down its European creditors, insisting on better terms of repayment of 195 billion euros ($216bn) in emergency loans.

The European Union denounced the Turkish-Libyan deal in December and issued a strong statement in Greece's favour.

The agreement "infringes upon the sovereign rights of third states, does not comply with the Law of the Sea and cannot produce any legal consequences for third States," the EU summit conclusions said.

200104110325735

Russia, the United States, Israel and Egypt also denounced the deal at the time, saying it raises tensions in the eastern Mediterranean.

Germany has invited several other EU members, Gulf states, the US, Russia and China to attend talks, but refused to divulge why it did not invite Greece.

Haftar also met with Greek Prime Minister Kyriakos Mitsotakis, who has threatened to veto any peace agreement that displeases Greece.

"I want to be clear. Greece will never accept a political solution for Libya that doesn't scrap the illegal 'Turkey-Libya memorandum of understanding'," Mitsotakis tweeted on Thursday.

"We will veto it before it reaches the Summit. We will veto it at the foreign minister level."

It was unclear whether Greece would enjoy any opportunity to veto a UN peace agreement on Libya.

"If there is a peace agreement on Libya and Germany brings it to the European Union for ratification, that is when Greece could have an opportunity to exercise a veto," international relations expert Kostas Yfantis told Al Jazeera.

Mitsotakis also spoke on the phone with German Chancellor Angela Merkel.

"He asked Ms. Merkel and other EU representatives present at the talks to implement the decision of the last European Council," his office said, a reference to the denunciation of the Libya-Turkey agreement.

Greek-Turkish conflict simmers

Greek-Turkish acrimony over maritime jurisdiction goes back to 1973 when Greece discovered oil in the north Aegean.

The two countries nearly came to war when Turkey sent a state exploration vessel, the Sismik, into north Aegean waters in 1987.

The stage is now set for a similar confrontation.

Turkish President Recep Tayyip Erdogan on Thursday said the state exploration vessel, Uruc Reis, would this year begin to conduct seismic tests in the Turkish portion of the maritime jurisdiction agreement struck with Tripoli.

Turkish vessels have already spent a year looking for oil and gas in waters claimed by EU member Cyprus. The EU and the US have called those explorations "illegal".

"The European Council unequivocally reaffirms its solidarity with Greece and Cyprus regarding these actions by Turkey," the EU said last month, in reference to Turkish explorations offshore Cyprus.

Unlike Cyprus, however, Greece has not agreed its maritime jurisdiction with neighbours Albania, Italy, Libya, Egypt, Cyprus and Turkey.