Turkey's role in Libya is to do whatever the international law and justice requires, 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. Yaşar Güler, who were 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 attacks of putschist Gen. 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 the 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 took effect on Dec. 8.
Referring to the recent tensions with France over a claim of vessel harassment in the Mediterranean, Akar said: "These are plots pursuing some political, not military interests. France should apologize to Turkey."
Relations between NATO members have soured over the Libya conflict. 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.
Foreign Minister Mevlüt Çavuşoğlu 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 Çavuşoğlu 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 Moammar Gadhafi in 2011. The country's new government was founded in 2015 under a U.N.-led agreement, but efforts for a long-term political settlement failed due to a military offensive by Haftar's forces.
The U.N. recognizes the Libyan Government of National Accord (GNA) headed by Fayez al-Sarraj as the country's legitimate authority as Tripoli battles Haftar's militias.
The GNA 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 air base and the city Tarhuna, Haftar's final stronghold in western Libya.
Akar and Güler later in the day also held talks with Malta's minister for home affairs and national security in Valetta, the capital of the island nation.
Arriving in Malta after their visit to Libya, Akar and Güler exchanged views with Byron Camilleri. The Turkish and Maltese officials later also led the talks between delegations.
On Twitter, Camilleri said they discussed "issues of common interest in the Mediterranean region, including the security situation in the region" along with issues of law enforcement and the fight against human smuggling.