Fierce fighting in eastern Libya between army troops loyal to a general at the centre of recent coup rumours and two armed groups has killed at least 24people and injured 90, according to officials.
The country's top military official was describing Friday's offensive - launched without government approval - as a "coup", news agency the Associated Press reported.
Military aircraft and helicopters, apparently under the command of Major General Khalifa Haftar, were flying over the city of Benghazi on Friday, Libyan security officials said.
On the ground, Haftar's troops attacked the bases of the Islamist group Rafallah al-Sahati and another group known as February 17, the officials said.
Major General Abdel-Salam Gadallah al-Obeidi, Libya's chief of staff, said forces that launched the Benghazi assault were under Haftar's control. However, he did not address claims that federal forces fought on Haftar's side, according to the Associated Press.
Al-Obeidi said he would ban any forces from entering Benghazi to join Haftar, without elaborating. Al-Obeidi later described the unfolding events as a "coup', the Associated Press reported.
Interim Prime Minister Abdullah al-Thinni later said only one jet moved out to attack the armed groups without government permission, along with some 120 weapons-loaded army vehicles.
"This is an attempt to use the current security situation to stand against the revolution. ... The era of coup is gone,'' he said in a televised statement.
Libya's state LANA news agency, citing medical sources, said 12 people had been killed and 90 were injured.
Mohammed al-Hegazi, a spokesman for Haftar, told Libyan television station Al-Ahrar that some military units joined Haftar and his forces in their fight against the armed groups.
He said the operation, called the `"Dignity of Libya," included air forces and special forces.
Al-Hegazi said Haftar's forces now controlled the two militia bases.
The "clashes will not stop until the operation achieves its goals," al-Hegazi said.
He said forces based at the city's airport had also joined Haftar.
While it was not immediately possible to verify his claims, Reuters reported that Libyan authorities closed the Benghazi airport late on Friday because of the fighting.
"We have closed the airport for the safety of passengers as there were clashes in the city. The airport will be reopened depending on the security situation," Ibrahim Farkash, the director of Benghazi's Benina airport, told Reuters.
Associated Press footage from Benghazi showed at least one military helicopter flying overhead as gunfire crackled in the city.
The LANA news agency quoted Milad al-Zowi, a special forces spokesman, denying that his troops were involved.
Friday's assault marks the first time that army units have fought unilaterally and joined forces with Haftar, who once headed the army under Gaddafi but defected in the 1980s. After Gaddafi's ouster, he was assigned to help rebuild the forces, but he was removed soon after.
In February, Haftar appeared in an online video aired on several Libyan television stations. Wearing a military uniform, he stood in front of a map of Libya and the national flag and claimed to speak for the "general command of the Libyan army".
In the video, he said the military intended to "rescue" the nation.
Libya's government viewed Haftar's statement as a coup attempt. Later Libyan media reports claimed Haftar held meetings in air bases in eastern Libya to win the support of the military.
Armed groups grew in number and power after the ouster of longtime dictator Muammar Gaddafi in 2011, taking advantage of Libya's disarrayed military and police.
Also on Friday, Algerian's Foreign Ministry announced the closure of its embassy in Tripoli, citing "information of a clear and imminent threat" to its diplomatic personnel.
The statement did not specify if the ambassador and his staff had been evacuated and described the closure as a temporary measure in light of the "difficult security conditions".