Pakistani policemen cordon the main entrance of the air force base following an attack in Kamra on Thursday. Militants armed with guns and rocket launchers stormed a key Pakistani air force base before dawn, sparking hours of heavy clashes that killed eight people, officials said. (AAMIR QURESHI/AFP/GETTY IMAGES)

Armed militants stormed a major Pakistani air force base early Thursday, sparking an hours-long firefight with security forces and raising concerns about the military’s ability to subdue insurgents.

Nine militants and one Pakistani military official were killed in the attack, which began about 2 a.m. local time at the Minhas base, about 37 miles northwest of Islamabad, an air force spokesman said.

The militants were armed with automatic weapons and rocket-propelled grenades. Some of the militants wore suicide vests, the spokesman said. One fighter aircraft was damaged in the attack.

The Pakistani Taliban claimed responsibility for the attack. Its spokesman, Ihsanullah Ihsan, said the attack was revenge for military actions in the tribal areas of northwestern Pakistan. He said the attack was carried out by four suicide bombers, but the air force indicated that nine militants were involved.

Ihsan also claimed that the attackers killed “dozens of security people” in the assault. “We could do anything and target whatever we want,” he said. “Our fighters can hit any target anywhere.”

Separately Thursday, the Pakistani Taliban’s Darra Adam Khel faction claimed responsibility for a targeted sectarian attack near the city of Gilgit in northwestern Pakistan.

In the dawn attack, gunmen ambushed three buses, forced passengers out and shot 22 of them dead, the Reuters news service quoted officials as saying. The officials said the assailants checked passengers’ ID cards and then opened fire on the Shiites.

“They are enemies of Sunnis and conspire against us,” Mohammed Afridi, a spokesman for the faction, told Reuters by telephone from an undisclosed location, referring to Shiites. “We will continue such attacks in the future.”

In the assault on the base, intense clashes between air force commandos and the insurgents lasted for more than two hours, an air force spokesman said. The commander of the base, Air Commodore Muhammad Azam, who was leading the operations against the attackers, was shot and injured in the shoulder, the air force spokesman said. He was reported in stable condition.

The Minhas base, in the town of Kamra, houses the Pakistan Aeronautical Complex, the manufacturing division of the air force. It builds French-designed Mirage fighter planes and, with Chinese support, JF-17 fighter jets. Some reports suggested that the air base housed part of Pakistan’s nuclear arsenal, but the air force spokesman denied the reports.

Security analysts also said it was not true that Pakistan keeps nuclear assets at a base or a military garrison. “Nuclear assets management is totally a separate issue and is being dealt with separately,”  said Mahmood Shah, a former brigadier general in the Pakistani army. “No nuclear arsenals are being kept in the known places, such as the air or naval bases or military cantonment areas.”

He said the attackers appeared to have good knowledge of the area and the base. “Its not the work of half-educated Taliban militants, but the handiwork of al-Qaeda planners” Shah said. He added that unlike in the Pakistani army, discipline in the air force and navy is loose that needs to be tightened.

The attackers, some wearing military uniforms, moved through a nearby village under cover of darkness and climbed a nine-foot wall strung with barbed wire to break into the base, according to Reuters news agency.

Security forces opened fire when militants strapped with suicide bombing vests approached aircraft hangars, prompting other militants to fire rocket-propelled grenades from outside the base’s walls, Reuters reported, citing the air force spokesman.

In May last year, a few days after the killing of al-Qaeda leader Osama bin Laden, militants carried out a similar attack on a Pakistani naval base in the southern city of Karachi.

The Taliban claimed responsibility for that attack, in which about 10 security personnel were killed and the militants destroyed two aircraft built by the United States.

The Pakistani military was also targeted on two previous occasions in Kamra. In one attack in October 2009, a suicide bomber killed six civilians and two air force members at a checkpoint outside the base. In December 2007, a suicide car bomber hit a school bus and injured several children of base employees.

The latest attack on the air base comes at a time when media reports suggest that Pakistan is preparing for a new military operation in the restive tribal region of North Waziristan.

North Waziristan is the base of the most powerful Taliban-linked militant group, known as the Haqqani network. The United States has been pushing Pakistan for months to carry out an offensive against the group, which is blamed for major terrorist attacks against U.S.-led coalition forces in Afghanistan.

Hasan Askari Rizvi, a Pakistani security analyst, said the attack on the air base “has raised serious questions about the security system” of the Pakistani armed forces.

Haq Nawaz Khan in Peshawar, Pakistan, contributed to this report.