'I will sink your ships': Libyan commander threatens Erdogan
"I have orders to sink any Turkish ship which enters Libya's borders, and I will do so myself," said Major General Faraj Mahdawi.
The threat was issued in Greek, which could deepen the insult to President Erdogan.
General Mahdawi's orders to sink any Turkish ship that comes to explore oil within Libya's borders follows a controversial deal on maritime boundaries in the Mediterranean reached between Turkey and Libya's UN-supported Government of National Accord (GNA).
"I have received the order from Haftar," General Mahdawi said in an interview with Greek channel Alpha TV on Monday.
General Haftar's Libyan National Army and its allied tribes, militias and mercenaries are currently locked in a battle to capture the capital Tripoli and defeat the UN-recognised GNA led by Fayez Sarraj.
Legislators approved the agreement which would give Turkey access to an economic zone across the Mediterranean, brushing aside objections by Greece, Cyprus, Egypt and the rival and competing power base in Libya, the Libyan National Army (LNA) led by warlord Khalifa Haftar.
Turkish President Recep Tayyip Erdogan signed the agreement with Libya's Tripoli-based government, which controls parts of the country's west. The two also signed a security cooperation agreement.
The deals sparked outrage in the Libyan parliament, which is based in the east and is aligned with Haftar's self-styled LNA.
Lawmakers there denounced the agreements as a "flagrant breach" of Libya's security and sovereignty, saying they grant the Turkish government the right to use Libyan airspace and waters as well as build military bases on Libyan soil.
Greece, Cyprus and Egypt have also criticised the boundary agreement, calling it a serious breach of international law.
The deal has added tension to an ongoing dispute with Greece, Cyprus and Egypt over oil-and-gas drilling rights in the eastern Mediterranean.
Greece's prime minister, Kyriakos Mitsotakis, said he discussed the issue and other differences between Greece and Turkey with Erdogan on the sidelines of a NATO summit Wednesday in London, adding that both leaders "noted disagreements".
Read more: Turkish-Libyan alliance in eastern Mediterranean: A game changer?
Greece's foreign minister on Monday threatened to expel the Libyan ambassador to Athens unless provided with details of deal.
Since 2015, Libya has been divided between two competing governments, one in the east, based in Benghazi, and the other in the west, in Tripoli.
While the LNA and the eastern government enjoy the support of France, Russia and key Arab countries including Saudi Arabia, Egypt and the UAE, the Tripoli-based government is backed by Italy, Turkey and Qatar.