TRIPOLI, Libya — Fighting in Libya escalated Thursday as Islamic militias claimed to control the country's second-largest city, Benghazi, while foreigners and U.N. workers continued their exodus in what increasingly is looking like a full-blown civil war.
The Islamic hard-liners' announcement in Benghazi marked a defeat for the forces of renegade Gen. Khalifa Hifter, who for months has pursued a self-declared campaign to stamp out armed militant groups. Once firmly in control of the eastern port city, Gen. Hifter's troops now appear to hold only the airport on Benghazi's outskirts.
The militants who overran the city belong to a new umbrella group called the Shura Council of Benghazi Revolutionaries that includes Ansar al-Shariah, the al Qaeda-inspired group accused by the U.S. of leading the Sept. 11, 2012, attack on a diplomatic facility and CIA annex that killed Ambassador J. Christopher Stevens and three other Americans.
"We are the only force on the ground in Benghazi," a commander of one of the coalition's factions told The Associated Press on Thursday, speaking on condition of anonymity because he was not authorized to talk to the press.
The extent of the militias' control of the city was not clear. On Thursday, Benghazi's streets were nearly empty as residents remained indoors. The main police headquarters was still smoldering after a militia shelling from a day before.
An Ansar al-Shariah video aired Thursday featured militia commander Wissam bin Hamid congratulating his masked followers inside a base once used by Libyan special forces, one of the last effective vestiges of the Libyan government's military.
"We will not stop until we establish the rule of God," said Mr. bin Hamid in the video.
The Libyan special forces and others pushed Ansar al-Shariah out of Benghazi after Mr. Stevens' slaying. Last month, U.S. Special Forces apprehended a top Islamist commander, Ahmed Abu-Khattala, who allegedly helped orchestrate the attack that led to Mr. Stevens' death. In response, the militias regrouped and stepped up their attacks, recently taking over the city's seaport, a major hospital and army barracks full of weapons while carrying out assassinations, bombings and other violence.
Benghazi's fall came after the U.S., Britain and other countries ordered their diplomats to evacuate Tripoli in recent days as militants attacked the Libyan capital, leaving behind a terrified populace and rapidly dwindling services. An intense fire at a massive fuel depot has been raging out of control for days in the city, prompting fears of widespread toxic pollution.
Fighting in Tripoli started two weeks ago, when Islamic militants from Misrata, a city about 130 miles east of Tripoli, attacked the airport and a military compound that belonged to local militias. The Misrata fighters are part of the Libya Dawn Revolutionaries, who claim to be liberating Tripoli from forces who fought for dictator Moammar Gadhafi, who was deposed and killed in the 2011 revolution.
Tripoli resident Bassam Yekhlef said he fears the militias would impose a harsh interpretation of Islamic law on the city.
"My biggest fear would be getting arrested by the militias," he said. "The situation will get worse, especially as the Misrata militias continue to get reinforcements."
Libya's Health Ministry said Thursday that the death toll in Tripoli since the violence intensified in the past month reached 214, with more than 981 people wounded.
Black clouds of smoke billowed from burning power stations in Tripoli on Thursday. Shelling has taken out radio towers and oil lines, and residents eke out survival with a few hours of electricity a day. Most households lack water and fuel, and food and medicine are scarce. Businesses are shuttered, and banks are closed.
By noon on Thursday, more than 10,000 Libyans had fled by land across the border into neighboring Tunisia during the previous 12 hours, Tunisia's state news agency reported. They joined thousands of other Libyans who already have streamed into Tunisia in recent days.
Spain announced it was pulling its ambassador and most embassy staff out of Tripoli, a step already taken by the United States. China has chartered a Greek vessel to evacuate hundreds of Chinese citizens, and the Philippines is working to get out some 13,000 Filipino workers inside Libya.
Libyans pleaded for the West for help on Thursday.
"We need NATO to intervene to stop those responsible for the attacks that hurt civilians," said Aboharba AL Sedek, who lives on the outskirts of Tripoli. "There shouldn't be armed militias in the capital. I fear that we are going to lose our nation as well as our people."
Libya has failed to install a stable democratic government or effective security force since Mr. Gadhafi's ouster. The country's second prime minister, Ali Zeidan, was briefly kidnapped in 2013. An interim government, failing to unify the country, had been paying rival militias to maintain security in recent months. Now those militias are turning on the government and each other.
Libyans don't see how they can reach a peaceful democratic solution to the fighting or avoid a humanitarian crisis without international intervention.
"The international community should act strongly to stop the spreading of violence," said Nada Alzaher, who lives in Zawiya, about 30 miles west of Tripoli. "I'm afraid that it will spread across Libya and that I will have to leave my home and become a refugee."
Political activist Mabruk Swayah said Libya cannot practice democracy on its own. He feared the oil-rich country could become a base for well-funded terrorists to operate throughout the Middle East and Mediterranean.
The country already has sent well-armed jihadists to Iraq, Syria and other countries where Islamic militants have taken root, he said. Now the militias that claim to control Benghazi have access to military barracks, tanks, rockets and ample ammunition.
"Libya is simply a collection of fractious tribes and, not surprisingly, they have been battling for power ever since [the revolution]," Mr. Swayah said. "Afterward, Libya became the region's arms supermarket, helping to destabilize the whole region. And now Libya is more dangerous than ever."
• This article is based in part on wire service reports.