Militants linked to al-Qaeda overran a military base in southern Yemen on Thursday in a sophisticated attack that signaled the extremist group’s desire to exploit widening turmoil in this Arabian Peninsula nation.

Six soldiers were killed and three were wounded during the early morning assault on a base housing the 19th Infantry Brigade in the Baihan area of southern Shabwa province, said Col. Adel Ali Hadi, chief of special forces operations in the area.

The attack came three weeks after Houthi rebels effectively deposed Yemen’s U.S.-backed president, Abed Rabbo Mansour Hadi. He had supported a U.S. drone program that targets al-Qaeda’s branch in Yemen, known as al-Qaeda in the Arabian Peninsula (AQAP).

“They attacked using different kinds of weapons, including suicide bombs, artillery, bazookas and medium-size weapons,” Hadi said.

He added that a military warplane attempted an airstrike on the base after the militants seized it, but the bid missed.

In New York, U.N. Secretary General Ban Ki-moon warned during a briefing with the Security Council that Yemen was descending into chaos.

“Yemen is collapsing before our eyes. We cannot stand by and watch,” he said, adding that the country must be pulled back “from the brink.”

In recent days, the United States and several other countries closed their embassies in the Yemeni capital.

In Washington, a senior U.S. official indicated that the decision to shut the U.S. Embassy may have been driven more by concern about the danger posed by AQAP than about broader instability in the capital.

In written testimony submitted to the Senate Intelligence Committee, Nicholas Rasmussen, director of the National Counterterrorism Center, cited concern that “AQAP could take advantage of the political chaos in the capital to carry out attacks against our personnel or other Western targets in Sanaa.”

During Thursday’s attack in Yemen, AQAP fighters blew up two car bombs and overpowered scores of soldiers stationed at the base, said Sheikh al-Fatimi, a prominent tribal leader from the area.

The al-Qaeda group claimed victory in the attack, posting images on its Twitter account of militants in armored vehicles. The authenticity of the images could not immediately be verified.

According to Fatimi, many of the soldiers surrendered to the al-Qaeda fighters, but a group of 50 held out, including the brigade commander, Brig. Gen. Hamid al-Sowmeli. They were besieged for several hours, he said. Tribal leaders negotiated their release as well as the handover of an unspecified number of soldiers who had surrendered earlier, said Fatimi, who was involved in the negotiations. AQAP took full control of the base after all of the soldiers exited, he added.

He said that seven al-Qaeda militants, including two suicide bombers, were killed in the assault. About 100 attackers were still inside the base, Fatimi said.

The al-Qaeda group, made up of radical Sunni Muslims, has sought to exploit Yemen’s unrest to gain followers. It considers the Houthis, who are adherents of the Zaydi sect of Shiite Islam, to be enemies.

Greg Miller in Washington contributed to this report.