ISTANBUL/ANKARA (Reuters) - Libya’s internationally recognized government and Turkey have signed an agreement on maritime boundaries in the Mediterranean Sea that could complicate Ankara’s disputes over energy exploration with other countries.

FILE PHOTO: Turkish drilling vessel Yavuz is escorted by Turkish Navy frigate TCG Gemlik (F-492) in the eastern Mediterranean Sea off Cyprus, August 6, 2019. REUTERS/Murad Sezer/File Photo

Turkey, which announced the accord and a deal on expanded security and military cooperation on Thursday, gave no details of their memorandum of understanding and did not specify where Turkish and Libyan waters meet.

Libya’s neighbor Egypt dismissed the deal as “illegal”, and Greece said any such accord would be geographically absurd because it ignored the presence of the Greek island of Crete between the coasts of Turkey and Libya.

Tensions are already running high between Athens and Ankara because of Turkish drilling in the eastern Mediterranean off the coast of the divided island of Cyprus, and the European Union has prepared sanctions against Turkey in response.

The dispute has left Ankara searching for allies in the region. The new agreements were signed at a meeting on Wednesday between Turkish President Tayyip Erdogan and Fayez al-Serraj, the head of the Tripoli-based government which Ankara is backing against a rival military force based in eastern Libya.

“This means protecting Turkey’s rights deriving from international law,” Turkish Foreign Minister Mevlut Cavusoglu said of the memorandum of understanding on the “delimitation of maritime jurisdictions”.

He said that such accords could be agreed with other countries if differences could be overcome and that Ankara was in favor of “fair sharing” of resources, including off Cyprus.

But Greek Foreign Minister Nikos Dendias said any maritime accord between Libya and Turkey “ignores something that is blatantly obvious, which is that between those two countries there is the large geographical land mass of Crete.

“Consequently such an attempt borders on the absurd.”

Egypt, which has been at odds with Turkey since the Egyptian military overthrew Islamist President Mohamed Mursi in 2013, condemned the deal as “illegal and not binding or affecting the interests and the rights of any third parties”.

The internationally recognized government in Tripoli confirmed the new agreements but gave no details.

The government in eastern Libya, where rival political factions have been based since 2014, said the maritime accord was illegitimate.

The Turkish presidency’s communications director Fahrettin Altun tweeted on Thursday that the agreement will strengthen military ties with the Tripoli-based government.

Slideshow ( 2 images )

Libya has been divided since 2014 into rival military and political camps based in the capital Tripoli and the east. Serraj’s government is in conflict with forces led by Khalifa Haftar based in eastern Libya.

Haftar controls most of Libya’s oil fields and facilities but oil revenues are controlled by the central bank in Tripoli.

In June, Haftar’s Libyan National Army (LNA) said they had cut all ties with Turkey and that all Turkish commercial flights or ships trying to access Libya would be treated as hostile.

Diplomats say Ankara has supplied drones and trucks to Serraj, while the LNA received support from the United Arab Emirates and Egypt.