Turkey’s presence in Libya is to do whatever the international law and justice require, the Turkish defense minister said on Saturday.

“Turkey is together with the Libyan brothers. No one should doubt it, we will not give up on it,” Hulusi Akar said.

Akar and Chief of General Staff Gen. Yasar Guler, who are on an official visit to Libya, met Turkish security forces in the country. They later visited Tripoli’s Mitiga Hospital, which was frequently targeted by the attacks of warlord Khalifa Haftar’s militias, and met the Turkish health care staff at the hospital.

“Our task here [in Libya] is providing military training, cooperation and consultancy. We try to contribute to our Libyan brothers in these areas as much as we can,” he said.

He pointed out that Turkish Armed Forces in Libya fulfilled its duty in a “distinguished” way, and added that: “What you [security forces] do here will definitely have an important place in history.”

The top officials also visited the Turkish Maritime Task Group ship on duty off the coast of Libya in the Central Mediterranean.

Last November, Turkey and Libya signed landmark pacts on military cooperation as well as boundaries in the Mediterranean.

Under the deal, Turkey has sent advisers to help the Libyan army defeat Haftar’s militias.

The maritime pact asserted Turkey’s rights in the Eastern Mediterranean in the face of unilateral drilling by the Greek Cypriot administration, clarifying that the Turkish Republic of Northern Cyprus (TRNC) also has rights to the resources in the area. It went into effect on Dec. 8.

Referring to the recent tensions with France over a claim of vessel harrasment in the Mediterranean, Akar said: “These are plots pursuing some political, not military interests. France should apologize to Turkey.”

France last week claimed that Turkey harassed one of its vessels taking part in a NATO mission in the Mediterranean. Turkish military officials denied the allegations.

Turkey’s Foreign Minister Mevlut Cavusoglu on Thursday also demanded an apology from France for misleading NATO and EU about recent tensions in the Mediterranean.

“France did not tell the truth to both NATO and EU. The claim that our ships locked is not true. We proved that and gave the documents to NATO. And NATO saw the reality,” said Cavusoglu in a joint news conference with his German counterpart Heiko Maas.

Libya has been torn by a civil war since the ouster of late ruler Muammar Gaddafi in 2011. The country’s new government was founded in 2015 under a UN-led agreement, but efforts for a long-term political settlement failed due to a military offensive by Haftar’s forces.

The UN recognizes the Libyan government headed by Fayez al-Sarraj as the country’s legitimate authority as Tripoli battles Haftar’s militias.

The government launched Operation Peace Storm against Haftar in March to counter Haftar’s attacks on the capital Tripoli, and recently liberated strategic locations, including Al-Watiya airbase and the city Tarhuna, Haftar’s final stronghold in western Libya.

* Writing by Jeyhun Aliyev from Ankara

Copyright 2022 Anadolu Agency. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.