Tripoli: Fierce fighting forced the closure of the Libyan capital’s only civilian airport on Monday, officials said, after a militia in charge of security there said it had been attacked.

The Facebook page of Mitiga International Airport, in eastern Tripoli, said “flights have been suspended because of fighting that broke out this morning”.

Al Radaa, a force loyal to the UN-backed Libyan government and tasked with keeping the facility secure, said in a statement it had come under attack.

An armed group “has attacked Mitiga international airport... which is home to a prison where more than 2,500 people are detained for various” reasons, Al Radaa said on Facebook.

Fighters attacked in a bid “to free” some of its members detained there, it added, without identifying the assailants or saying if there were casualties or damage.

Heavy gunfire could be heard as far away as Tajura 30 kilometres east of Tripoli, AFP reporters said, adding that all roads to Mitiga were closed.

A Libyan pilot said the airport, the scene of frequent clashes between rival militias, had been evacuated.

“All the staff and passengers who were at the airport were evacuated,” the pilot said, speaking on condition of anonymity.

“We saw tanks in the airport’s perimeter,” he added.

Mitiga, a former airbase, has been a civilian airport since Tripoli’s main international airport was badly damaged in fighting between rival militias in mid-2014.

Libya has been wracked by chaos since the 2011 uprising that toppled and killed long-time dictator Muammar Gaddafi, with rival authorities and militias battling for control of the oil-rich country.

The North African country has rival administrations, with the authorities in the east not recognising the UN-backed Government of National Accord (GNA) based in the capital.

Al Radaa is loyal to the GNA and also serves as a police force in Tripoli, as well as tracking suspected militants and drug and alcohol smugglers.