A building that witnesses said was hit by a rocket burns after clashes between rival militias in the Sarraj district of Tripoli, Libya, on Saturday. (Ismail Zitouny/Reuters)

The United Arab Emirates and Egypt have carried out a series of airstrikes in the Libyan capital, Tripoli, U.S. officials said Monday, marking an escalation in the chaotic war among Libya’s rival militias that has driven American and other diplomats from the country.

The Obama administration did not know ahead of time about the highly unusual military intervention, although the United States was aware that action by Arab states might come as the crisis in Libya worsened, said one official who spoke on the condition of anonymity because of the sensitivity of the matter.

The airstrikes appear tied to fear over the growing muscle of Islamist militias. The region’s monarchies and secular dictatorships are increasingly alarmed about Islamist gains from Libya to Syria and Iraq. And the airstrikes may signal a new willingness by some Arab states to take on a more direct military role in the region’s conflicts.

Various groups in Libya have been battling for control of the main Tripoli airport, and the strikes may have been a failed attempt to keep the strategic facility from falling to extremists.

The United States shuttered its embassy in Tripoli a month ago as militia infighting erupted into gun battles in the streets.

An aircraft damaged by shelling sits at Tripoli International Airport on Sunday. (Reuters)

U.S. officials have long been worried about a proxy war in Libya, with Saudi Arabia, Egypt and the UAE backing more secular militias against Islamist forces supported by Qatar. The United States says Qatar is arming and funding Islamists in Libya.

During the weekend, Islamist militias blamed the airstrikes on Egypt and the UAE. That prompted a denial by Egyptian President Abdel Fattah al-Sissi. Egypt did not conduct strikes or other military operations in Libya, the state news agency MENA quoted Sissi as saying. The UAE government declined to comment.

After the first of the two air attacks in Libya, U.S. intelligence believed the claims of responsibility made by retired Libyan Gen. Khalifa Hifter, who is combating militia fighters. It was only after a second round of attacks, during the weekend, that intelligence officials began to focus on other actors.

The New York Times first reported on the strikes, which it said were carried out by Emirati planes from Egyptian air bases.

U.S. officials, speaking on the condition of anonymity, said that the departure of UAE jets from their bases would not have attracted notice and suggested that the planes were armed during a stopover in Egypt.

The Obama administration would not confirm the participation of Egypt and the UAE publicly nor discuss any details of the operation.

“Libya’s challenges are political, and violence will not resolve them,” State Department spokeswoman Jen Psaki said. “Our focus is on the political process there. We believe outside interference exacerbates current divisions and undermines Libya’s democratic transition. And that’s why our focus remains on urging all factions to come together to peacefully resolve the current crisis.”

Earlier this year, administration officials suggested to friendly governments in the Middle East that a direct, joint appeal from them for more substantive assistance in confronting regional threats might circumvent legal barriers to U.S. action such as the absence of a United Nations mandate.

The effort was delayed, and then set aside, as Arab governments questioned whether the administration could produce the requisite congressional backing for any joint operations with the U.S. military.

The role of UAE planes in the U.S.-European air attacks that helped drive Libyan leader Moammar Gaddafi from power in 2011 allowed the Obama administration to characterize that operation as one in which Arab allies were closely involved.

Since then, the administration has pressed governments in the Persian Gulf region to commit to a more public partnership in supporting U.S.-backed rebels and defeating Islamist extremists in Syria’s civil war.

But it is not clear whether the administration’s desire for its Arab partners, particularly in the Persian Gulf, to assist efforts against Islamic State militants in Syria extends to trying to solve what it sees as essentially a political problem in Libya.

The Obama administration has helped establish and support an elected government in Libya, but no leader there has been able to control militants empowered in the wake of Gaddafi’s fall.

U.S. Ambassador J. Christopher Stevens and three other Americans were killed in September 2012 in an attack on U.S. compounds in Benghazi. That restive eastern city had been the center of rising militia violence that has since spread widely, including to Tripoli.

At least some of the airstrikes during the past week were conducted using U.S.-made munitions, a Libyan militia commander said Monday. The UAE is a U.S. military partner with access to American munitions.

“The bombs were American-made, and as far as our information goes regarding that ammunition, it is only used by Saudi Arabia, the UAE and Israel in the Middle East,” said Abubaker al-Huta, a militia commander.

Huta said that his men recovered part of an unexploded shell from the bombing raid and that a serial number on the shell confirmed that it was not part of Libya’s arsenal.

The strikes came amid spreading political chaos in the country. A rump Libyan parliament convened Monday and declared a June election invalid. That left the country with two rival leaders and assemblies, each backed by armed factions, Reuters reported.

The weak, Western-backed government has appealed for outside help to protect key infrastructure it says the state cannot defend.

“There are forms of international intervention” that could be possible, Reuters quoted Mohamed Jibril, Libya’s ambassador to Egypt, as saying on the sidelines of a meeting of Libya’s neighbors in Cairo. “Libya is unable to protect its institutions, its airports and natural resources, especially the oil fields.”

The United States, Britain, France, Germany and Italy issued a joint condemnation Monday of the fighting across Libya, “especially against residential areas, public facilities, and critical infrastructure, by both land attacks and air strikes.”

“Those responsible for violence, which undermines Libya’s democratic transition and national security, must be held accountable,” including consideration by the U.N. Security Council this week, the five nations said.

“We believe outside interference in Libya exacerbates current divisions and undermines Libya’s democratic transition,” the group’s statement concluded.

Fighting in Libya in recent weeks is the worst since the NATO-backed campaign to oust Gaddafi.

“The strikes likely indicate frustration in Cairo and Abu Dhabi with the lack of U.S. action to stabilize Libya and act against growing anarchy in the Middle East,” scholar Simon Henderson wrote for the Washington Institute for Near East Policy.

Hassan Morajea in Tripoli, Abigail Hauslohner in Cairo and Karen DeYoung in Washington contributed to this report.