A spokesman for one of Libya's warring factions threatened to target civilian airliners flying over Tripoli airspace on Wednesday, prompting Mitiga, the only functioning airport in Libya's largest city, to halt and divert flights elsewhere. The airport reportedly reopened on Thursday.

A spokesman for the forces of General Khalifa Haftar's Libyan National Army – which controls the eastern half of the war-torn country and some enclaves near Tripoli in the country's west – said in a video message posted on Twitter that all aircraft operating in airspace surrounding Tripoli, whether military or civilian, would be deemed hostile and could be shot down.

"Any military or civilian aircraft, regardless of its affiliation, flying over the capital will be destroyed," the spokesman said, claiming the rival UN-backed Government of National Accord (GNA) was using the airport for military purposes.

Get Breaking News Delivered to Your Inbox

On Thursday, Fayez al-Sarraj, the head of the GNA in Tripoli, announced the airport had been reopened. The airport confirmed it was operating again on Facebook, but there were no immediate reports on Arabic media of flights actually departing or arriving.

The threat from Haftar's forces comes weeks after a civilian aircraft was mistakenly shot down in Iran. That incident led to calls from European countries for better coordination and information sharing to protect civilian airlines flying through conflict zones.

Mitiga is a former air base that has been used for civilian flights since Tripoli's main airport was destroyed in 2014. Haftar's fighters say it is being used by the GNA to attack their troops in the south of the city.

Libya has been embroiled in a violent civil war since the overthrow of dictator Muammar Qaddafi in 2011. The western half of the country is currently controlled by the UN-backed GNA, while the east is controlled by Haftar's forces, loyal to the former parliament. Both sides have received backing by various international players, further complicating attempts to end the conflict.

In recent weeks, world powers have increased their efforts to broker a solution. A summit took place in Berlin on Tuesday, and Algeria was hosting another meeting on Thursday.

Khaled Wassef contributed to this report.