"There will be a very heavy price for hostile attitudes or attacks, we will retaliate in the most effective and strong way", Turkish Defence Minister Hulusi Akar told state news agency Anadolu.
He also stressed that Ankara's aim in Libya is to "contribute to peace and stability in the region".
"It should be known that we have taken all kinds of measures to deal with any threat or antagonistic action against Turkey", the minister added.
The statement comes a day after Field Marshal Khalifa Haftar, who leads the Libyan National Army accused Turkey of supporting his rivals, the GNA, according to AFP. He has also reportedly ordered to target Turkish ships, companies, ban flights, and arrest Turkish citizens in Libya.
The LNA also downed a drone that had attempted to attack the army's positions, claiming it was a Turkish-made aircraft.
Addressing the situation, Turkish President Recep Tayyip Erdogan said he was not aware of Haftar's threats.
Since early April, the LNA has been engaged in an offensive to gain control over Tripoli. The GNA has been waging a counteroffensive to prevent the Haftar-led forces from capturing the city.
Libya has been in a state of military conflict between various groups since its long-time leader Muammar Gaddafi was overthrown in 2011. The eastern part of the country is governed by the parliament in Tobruk, which is backed by the LNA. The Tripoli-based GNA, headed by Prime Minister Fayez Sarraj, operates in the country's west.