KABUL — An insurgent draped in explosives stalked the halls of the Defense Ministry in Kabul on Monday and opened fire on guards in the third major security breach at an Afghan base within four days, according to Afghan officials and witnesses.

Wearing an Afghan military uniform to evade layers of security at the downtown compound, the Taliban insurgent apparently intended to kill the defense minister, Abdul Rahim Wardak, and other top Afghan army officials. Neither Wardak nor the army chief of staff was in his office at noon when the shooting took place.

But the would-be bomber, who was fatally shot by Afghan soldiers before he could detonate his vest of explosives, still managed to kill two Afghan soldiers and wound seven others, Afghan officials said. And his attack in an inner sanctum of President Hamid Karzai’s government added to the sense that Afghan government installations are porous and their security forces are susceptible to infiltration by Taliban sleeper cells.

Last Friday, a suicide bomber killed the Kandahar police chief in his headquarters and two police officers, and the next day, another bomber killed five NATO troops and four Afghan soldiers on an Afghan army base in eastern Afghanistan. Together, the attacks have raised intense concern among U.S. and Afghan officials that the Taliban is ramping up its effort to deploy insurgents within the security forces to slip past the concrete walls and armed guards that protect bases.

Although it has not been confirmed whether Monday’s assault was carried out by an Afghan soldier or someone posing as one, there have been a number of previous incidents of soldiers or police targeting U.S. and foreign troops, which undermines trust at a time when the United States is working aggressively to grow and train the Afghan security forces.

“Clearly, infiltration is something people worry about,” said a senior U.S. military official in Kabul, who spoke on the condition of anonymity to address a sensitive topic.

To combat the threat, NATO advisers, at the Afghan government’s request, are planning to assist in training a force of about 450 counterintelligence officers who would work down at the battalion level to investigate vulnerabilities and look for potential insurgent infiltrators.

The Afghan government has also begun in recent weeks a “personnel asset inventory” of all security forces, essentially placing every soldier and police officer in a biometric database that can be used to help identify those with criminal backgrounds. U.S. military officials said Wardak has also requested help in educating his forces on how to identify possible infiltrators.

“The Afghans are taking this very seriously,” another U.S. military official in Kabul said. “They don’t want to see this stuff happen any more than anybody else does.”

Monday’s attack involved at least one insurgent and possibly as many as three, according to people in the building at the time of the attack. One attacker opened fire on the second floor, down the hall from the minister’s office, killing a guard outside the deputy minister’s door. The insurgent, or possibly another one, had also walked the third floor near the office of the Afghan army chief of staff, Gen. Sher Mohammad Karimi.

“They had bad intel,” said an official in the building, who was not authorized to speak publicly about the incident. “They were attacking empty offices.”

At the sound of the shooting, some employees in the building locked doors and broke windows, escaping by scrambling outside. Afghan soldiers inside the building shot back at the attacker, launching an intense, minutes-long gun battle.

“The reaction by the ANA guards was exceptionally disciplined,” said the official, referring to the Afghan National Army.

A ministry spokesman, Col. Radmanish, said that the attacker was disguised as a soldier but was not in the army. Others said that a final determination had not yet been made.

The radical Islamist Taliban movement claimed responsibility for the attack, which it said was aimed at visiting French Defense Minister Gerard Longuet. But Longuet was not at the ministry when the assault occurred. Taliban spokesman Zabiullah Mujahid said in a text message that the attacker struck during a meeting with the French defense minister and caused “huge casualties.”

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

To pause and restart automatic updates, click "Live" or "Paused". If paused, you'll be notified of the number of additional comments that have come in.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

Spam

Offensive

Disagree

Off-Topic

Among the criteria for featured comments: likes by users, replies by users, previous history of valuable commenting, and selection by moderators.

Content from Allstate This content is paid for by an advertiser and published by WP BrandStudio. The Washington Post newsroom was not involved in the creation of this content. Learn more about WP BrandStudio.