Islamist groups seized the army special-forces headquarters in Benghazi, Libya after days of fighting that left at least 35 soldiers dead and plunged the country deeper into lawlessness.
An Islamist and jihadi alliance announced the capture of the main military base in the eastern city in a statement on Wednesday, which was confirmed by an army official.
Ansar al-Sharia, blacklisted as a terrorist organisation by Washington, posted photos on Facebook of dozens of weapons and crates of ammunition it claimed its jihadis had seized from the base.
Libya's Red Crescent said it had recovered the bodies of 35 soldiers from the base.
In the Libyan capital, Tripoli, a battle for control of the airport has seen nearly 100 people killed, 400 wounded and much of the airport destroyed in some of the worst violence since 2011.
A giant fire raged for the past three days after shelling hit airport oil depots, forcing nearby residents to evacuate, with firefighters largely unable to put it down because of clashes.
The head of the Muslim Brotherhood's political party, Mohammed Sawan, said the Islamsit militias' attempt to take the airport was prompted by fear that a renegade army general, Khalifa Hifter, would move his campaign from Benghazi to Tripoli, especially after the militias running the airport declared their backing for the general.
With the interim government paralysed, the fighting threatens the planned opening session of the newly elected parliament next week.
The violence is the latest chaos in a country where the central government, military and security forces have had no control since the ousting of Muammar Gaddafi in the 2011 civil war.
In a sign of the spiralling turmoil, tens of thousands of people had fled Libya into neighbouring Tunisia this week, the Tunisian foreign minister said on Wednesday. It was the biggest influx since the civil war, he said.
Monji Hamdi warned of the increasing number of Libyans who had been entering his country. He said that 5,000 to 6,000 were coming each day, and that the rate was increasing.
He said Tunisia could not absorb large numbers of refugees and warned his government could close the border.
"Our absolute priority is the security and stability of Tunisia and we will close the border if necessary," he said in Tunis.
In the clashes in Benghazi, Islamic militants defeated Hifter, who for months has been waging a campaign to stamp out the militants. The militants, including Ansar al-Sharia extremists, overran a series of army bases held by the general's supporters.
That blow to army units sparked street demonstrations in Benghazi late on Wednesday. Thousands of young protesters raised signs reading: "No militias. Yes to army and police."
They marched to a central hospital controlled by Ansar al-Sharia, expelled the militias and took control over it, according to hospital spokeswoman Fadia al-Barghathi.
Agence France-Presse, Associated Press