Rival armed groups battled Friday with warplanes and antiaircraft guns in the eastern city of Benghazi in the latest outbreak of militia-linked chaos in energy-rich Libya.
The state news agency LANA said there had been fatalities in the fighting, but did not say how many.
Prime Minister Abdullah Thani went on nationwide television and declared that security forces would restore order. But the North African nation's military is outgunned by rogue armed groups.
The weak central government has been unable to rein them in, although it has partly co-opted some armed factions by putting them on the government payroll. Libya's once-lucrative oil and gas industry has been ravaged by the slide into lawlessness, with militias seizing control of oil fields, ports and other installations.
The barracks bombardment was carried out by a group led by Khalifa Haftar, a former general who was a rebel commander in the uprising against Kadafi. Local news reports said his group -- which calls itself the National Army and whose ranks include a number of deserters from the regular armed forces -- claimed through a spokesman that it was moving against "terrorists" operating in Benghazi.
The city has been racked in recent months by violence, including assassinations, abductions and unrelenting attacks against security forces. Two soldiers were killed Thursday.
The United States and other Western governments are moving to help the Libyan government train a professional military but there has been little headway, and the armed forces have been ineffectual in dealing with crises.
In March, Libya’s navy was unable to prevent an illicit oil tanker from embarking from an eastern port with a cargo of crude oil that rebels had seized to sell on the black market.
The tumult has hit home in the capital as well. The Algerian government said Friday it was temporarily closing its embassy in Tripoli, citing security conditions. Diplomats have repeatedly been targeted for abduction.
The Jordanian ambassador to Libya was freed this week by an armed group after being snatched by gunmen and held for nearly a month. The Amman government met a demand by the group to hand over to Libyan authorities a prisoner who was serving time for a terror plot in Jordan.