Tripoli: Terrorists attacked Tripoli’s airport on Friday and killed three security personnel, a Libyan official said, in an assault claimed by Daesh.

“An armed group carried out an attack this morning on the prison located on the Mitiga air base, to try to free the detainees,” the airport security official said.

“First there was an explosion... and then a clash with automatic weapons,” he said, adding that at least eight attackers died.

A journalist who was at the airport heard a blast followed by gunfire.

Daesh later claimed the attack on Twitter.

Flights were unaffected by the incident at what is the only airport still functioning in the militia-held city.

Mitiga is a military airfield used for civilian traffic after Tripoli’s international airport was seriously damaged last year in fighting for control of the capital.

Islamist extremists have exploited the turmoil in Libya since the fall of veteran leader Muammar Gaddafi in 2011 to establish a foothold in the energy-rich North African country.

Daesh terrorists in June took over the coastal city of Sirte, 450 kilometres to the east of Tripoli.

Over the past few months, they have claimed several attacks in the Libyan capital, mostly against embassies.