ISTANBUL - Libya's internationally recognised government and Turkey have signed agreements on military cooperation and maritime boundaries in the Mediterranean Sea that could complicate Ankara's disputes over energy exploration with other countries.
The agreements come despite calls from the Arab League - which includes Libya - to end cooperation with Turkey in protest at its military offensive against Kurdish forces in Syria last month.
The Turkish government provided few details, declining to say where the Turkish and Libyan maritime boundaries met, but Turkish drilling in the eastern Mediterranean has angered Greek Cypriots, Athens and the European Union.
EU foreign ministers agreed economic sanctions against Turkey two weeks ago to punish it for drilling near the coast of Cyprus in violation of a maritime economic zone established off the divided island.
The dispute pits Turkey against Greece, Cyprus and other eastern Mediterranean states that have agreed maritime and economic zones, leaving Ankara searching for allies in the region.
The new agreements were signed at a meeting in Istanbul 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 favour of "fair sharing" of resources, including off Cyprus.
"We are ready to do this working together with everyone, but if countries do not favour this that is their own preference."
The internationally recognised 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 foreign affairs committee of the eastern-based parliament called it "a flagrant violation of Libya's security and sovereignty" and a threat to "peace and security in the Mediterranean sea".
The Turkish presidency's communications director Fahrettin Altun said in a tweet early on Thursday Ankara was confident that the military cooperation deal would improve security for Libyans.
"The agreement establishes training and education, structures the legal framework, and strengthens the ties between our militaries," he said. "We will also continue advocating for a political solution to build a democratic, stable and prosperous Libya."
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.
Saudi Arabia, Egypt and the UAE back Haftar, a military strongman who launched an offensive in April in a bid to seize Tripoli from militant groups loyal to the GNA.
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 ship trying to access Libya would be treated as hostile.
Diplomats say Ankara has supplied drones and trucks to Serraj. Serraj's government is also openly backed by Qatar.