Libyans workers clean inside Mitiga international airport

The Libyan capital's only working international airport remained closed to flights on Tuesday, the airport said, a day after fighting killed at least 20 people and damaged several planes.

Mitiga airport said in a statement that all scheduled flights had been rerouted through the western city of Misrata.

Mitiga airport, a former military air base on the eastern fringes of Tripoli, was evacuated on Monday after militiamen attacked it in an attempt to free colleagues held at a jail there.

The health ministry of Libya's UN-backed Government of National Accord (GNA) said 20 people were killed and 63 wounded in the clashes. It did not specify if the casualties were civilians or fighters.

Five aircraft belonging to state-owned Afriqiyah Airways, including a cargo plane, were severely damaged, the company said in a statement.

Private Libyan carrier Buraq Air said two of its Boeing planes were also damaged in the fighting.

Mitiga has been a civilian airport since the city'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 Moamer Kadhafi, with rival authorities and militias battling for control of its oil riches.

The airport's closure Monday was announced after Al-Radaa, a force loyal to the GNA and tasked with keeping the facility secure, said it had come under attack.

An armed group "attacked Mitiga international airport... which is home to a prison where more than 2,500 people are detained," Al-Radaa said.

Witnesses on Tuesday said calm had returned to the airport.

The GNA condemned a "premeditated" attack, saying the gunmen were trying to free "terrorists" belonging to the Islamic State group and Al-Qaeda.

The UN mission in Libya (UNSMIL) reminded all parties of their "moral and legal obligations to safeguard and protect civilians and civilian installations".