CNN  — 

Gen. Scott Miller, the head of US and NATO forces in Afghanistan, drew his sidearm during an attack that erupted in a Kandahar compound Thursday, according to a coalition member with direct knowledge of what happened.

Miller did not fire, the official said. It’s so rare for such a senior US military officer to be in a position that would require him to draw a weapon that US military officials said they could not immediately recall a similar case.

The police chief of Kandahar province, Gen. Abdul Raziq Achakzai, was killed and two Americans were wounded in the attack that took place following a security meeting.

The Americans included one US service member, a coalition contractor and one US civilian government employee, according to two US military officials. They were evacuated and are in stable condition.

The Taliban released a statement claiming responsibility, saying they killed “the notorious police chief” who was their primary target in the attack. The shooter was killed by the US military, one official said Thursday.

Miller was not in the direct line of fire of the gunman but was standing close by, the source said. He stayed in place to assure that the wounded were tended to and ordered them to be evacuated out of the area before non-wounded personnel. Some wounded personnel were quickly evacuated in the same helicopter as Miller leaving the scene.

Miller has years of experience commanding special operations forces. “He is the most lethal guy in the US military,” another special operations member said.

US Defense Secretary James Mattis told reporters on Thursday that he had met Raziq previously and called his death “the loss of a patriot.”

Miller offered similar praise in a statement provided by the NATO-led coalition.

“Today I lost a great friend LTG Raziq. We had served together for many years. Afghanistan lost a patriot, my condolences to the people of Afghanistan,” Miller said.

“The good he did for Afghanistan and the Afghan people cannot be undone,” Miller added.

Afghanistan’s President Ashraf Ghani commented on the attack Thursday saying, “my condolences with Afghan people specially people of Kandahar,” Ghani said, saying he had ordered Afghan security officials to investigate the incident.

While Kandahar has been one of the more relatively stable provinces in Afghanistan, the high-profile insider attack and assassination of a key American ally raises questions about the region’s future stability as the Afghan government readies for this month’s parliamentary elections.

“We remain absolutely committed to an Afghan led Afghan reconciliation. We need to find who has done this. But right now … we are going toward the election and we will continue to defend the Afghan people,” Mattis said.

CNN’s Nick Paton Walsh and Ryan Browne contributed to this report.