TRIPOLI, Libya (AP) -- A revolt by a renegade general against Islamists who dominate Libya's politics threatened to spiral into an outright battle for power that could fragment the North African nation as the country's numerous armed militias on Monday started to line up behind the rival camps.
Gen. Khalifa Hifter, who lived for years in exile in the United States during the rule of autocrat Moammar Gadhafi, touts himself as a nationalist who is waging a war against terrorism to save Libya from Islamic extremists. His loyalists and allies in the past days attacked Islamist militias in the eastern city of Benghazi and on Sunday stormed the Islamist-led parliament in Tripoli.
Hifter's opponents accuse him of seeking to grab power, acting on behalf of former regime figures in exile by orchestrating an Egyptian-style military overthrow of Islamists that would wreck already struggling attempts at democracy.
Since Gadhafi's ouster and death in a 2011 civil war, Libya has been in chaos. The central government has almost no authority. The military and police, shattered during the civil war, have never recovered and remain in disarray. Filling the void are hundreds of militias around the country. Many of them are locally based, rooted in specific cities or neighborhoods. Others are based on ethnic allegiances. Others have embraced al-Qaida-inspired extremism.
The country has held several elections, including ones that created a new parliament. But administrations have been paralyzed by the competition between Islamist parties and their rivals, each of which are backed by militias. Islamist lawmakers who dominate parliament removed the Western-backed prime minister earlier this year and named an Islamist-leaning figure Ahmed Maiteg to replace him in a vote their opponents say was illegal.
In response to the parliament attack, the Islamist-leaning head of the legislature, Nouri Abu Sahmein, ordered militias backing his camp to deploy in Tripoli on Monday to resist what he called "the attempt to wreck the path of democracy and take power."
The pro-parliament militias are largely from Libya's third largest city of Misrata, one of Islamists' biggest constituencies. Footage posted online by Misrata forces showed hundreds of pickup trucks mounted with anti-aircraft guns, tanks and armored vehicles it said were ready to move into the capital.
But backing for parliament appeared to be eroding, including within the interim government installed by lawmakers after the prime minister's removal.
The interim government, led by the defense minister, put forward a proposal for resolving the conflict. It said parliament should hold a new vote on a prime minister, pass a budget and then halt work to allow new parliament elections. Parliament's mandate expired earlier this year, and Islamists' opponents have held protests demanding it be dissolved.
Units of the weak military on Monday began splitting from their top generals to support Hifter.
The commander of an elite army unit in Benghazi, the Special Forces, announced his support for Hifter and his National Libyan Army, as he has called his loyalists. The unit is the only real state force in Benghazi, Libya's second largest city, where it has been fighting militants for months.
"Anyone who hurts the nation will be smashed. We are with the will of the people alongside the National Libyan Army in the battle of dignity," the commander, Wanis Abu Khamada, said in a televised address.
Also, troops at a military air base in the eastern city of Tobruk joined Hifter's forces, his spokesman Mohammed Hegazi said -- the latest in around five air bases to back the general in recent weeks. The claim was quickly challenged by deputy Defense Minister Khaled el-Sherif, who said that the base is still under "legitimate authorities."
"We are the real army of Libya," Hegazi told Libya al-Ahrar TV. "We are waiting for orders ... to either seek victory or be killed."
In a sign the violence could worsen, a number of foreign embassies in Tripoli shut down, including those of Saudi Arabia, the United Arab Emirates and Algeria, which also closed its borders with Libya, according to several news reports.
Hifter was a senior general in Gadhafi's military but defected, living in exile for years in Virginia in the United States in the 1980s. He returned during the 2011 uprising against Gadhafi.
The general is aiming to harness widespread public frustration with the weak military, the government's impotence and Islamists' power.
He appears to have the support of one of the country's most powerful militias, from the western Zintan region.
Hifter also draws strong backing in the eastern part of the country, especially Benghazi, where many demand autonomy from the central government and where anger at Islamists is high. Suspected extremist militias have been killing military and police officials, judges, activists and clerics in the city almost daily for months.