Turkey has taken all measures against possible hostile moves or threats, country’s minister of national defense said on Sunday, referring to threats by the spokesman of Khalifa Haftar’s forces in Libya.

"The price of hostile attitudes or attacks will be heavy, they will be responded with the most efficient and hard manner," Hulusi Akar told Anadolu Agency in Osaka city of Japan, where he was part of Turkish president’s delegation in G20 Leaders’ Summit.

Akar said that Turkey focused on Libya's territorial integrity, sovereignty, people's peace and happiness and the national consensus spirit in the country; however, it would not turn a blind eye towards threats.

Minister of national defense emphasized that Turkey would always be part of peace and stability efforts in line with the international law to resolve disputes between conflicting elements of Libya.

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.