Heavily armed Libyan militias clashed in Tripoli on Monday, killing at least 20 people and forcing the capital's only airport to close, officials said.

The Health Ministry said another 63 people were wounded in the fighting between two militias that are ostensibly allied with the internationally backed government, underscoring the lingering instability in the country seven years after a popular uprising toppled long-ruling dictator Moammar Gadhafi.

Civilians were among the dead, including an airline employee who was trying to get home after Matiga airport shut down. An airport official said staffers were evacuated from Matiga airport and that five flights have been cancelled. A picture posted on the airport's Facebook page showed a passenger plane with its roof blown off.

The official spoke on condition of anonymity because he was not authorized to speak to the press.

The Special Deterrent Force, a militia which controls the airport, was fighting a rival militia led by local strongman Bashir al-Baqara. Both are allied with the internationally recognized government in Tripoli. A rival government and parliament rule in Libya's east, but across the country real power is held by a dizzying array of armed groups.

The Presidency Council — one of the three ruling bodies in Tripoli — said al-Baqara's men wanted to release suspected al-Qaeda and Islamic State members held at a prison near the airport that is also run by the Special Deterrent Force. The government has ordered al-Baqara's men to hand over their weapons and disband.

Special Deterrent Force spokesman Ahmed bin Salem said four of his men were killed. He said the situation is now under control, and that a number of the attackers were arrested while trying to storm the prison. On its Facebook page, the force says the prison houses 2,500 detainees.

This frame of a video taken by the Italian Coast Guard on Jan. 6, in off Libya, shows Migrants are rescued from dinghies as they try to cross the Mediterranean Sea to Italy. As many as 64 African migrants, including a mother whose surviving 3-year-old child desperately clung to her, are feared dead after a traffickers' overcrowded rubber dinghy from Libya started taking on water and deflating in the Mediterranean Sea. (Italian Coast Guard/Associated Press)

The chaos in Libya has made it a major transit point for migrants from across Africa and the Middle East hoping to reach Europe.

On Monday, the coast guard intercepted three boats carrying at least 300 migrants bound for Europe, according to Ayoub Gassim, the spokesman for Libya's navy. The boats departed from different points near Tripoli and the coastal city of Sabratha, he said.