The threats by forces aligned with East Libya-based commander Khalifa Haftar toward Turkey is a "declaration of war" on Ankara, Libya's High Council of State said on Saturday.
The council in a statement described the threats as "a blow to relations with a country that cooperates with Libya in many areas and constitutes a large part of the country's total imports".
"Any attack on our friends, especially the Turks, will be regarded as harming our national security and will be resisted," the statement said.
The council also requested the UN to take measures to deter Haftar's forces, adding that it would continue relations with Turkey within the framework of bilateral agreements.
Earlier on Friday, Haftar's spokesman Ahmed al-Mismari announced a ban on commercial flights from Libya to Turkey and ordered his forces to attack Turkish ships and interests in the country.
Libya’s UN-recognized Government of National Accord on Wednesday recaptured the strategic city of Gharyan, south of Tripoli, from Haftar's forces in a major loss for the renegade commander. Turkey has supported the UN-recognized government in Tripoli.
Haftar's forces have so far been unsuccessful in seeking to capture Tripoli from the Government of National Accord in an offensive that began in April.
Nevertheless, his forces remain deployed in several areas around the capital.
Libya has remained beset by turmoil since 2011 when a bloody NATO-backed uprising led to the ouster and death of long-serving President Muammar Gaddafi after more than four decades in power.
Since then, Libya’s stark political divisions have yielded two rival seats of power -- one in Tobruk and another in Tripoli -- and a host of heavily armed militia groups.
By Walid Abdullah in Tripoli