An Afghan National Army soldier keeps watch near the site of a suicide attack in Kabul on Oct. 31. (Omar Sobhani/Reuters)

A U.S. service member was killed and another was wounded in an insider attack Saturday in Kabul, when a member of the Afghan security forces opened fire on them, officials said.

The wounded soldier was evacuated to Bagram air base, a U.S. military installation about 35 miles north of Kabul, for medical treatment, according to a statement from Debra Richardson, a spokeswoman for the U.S.-led NATO coalition .

Richardson said the assailant was gunned down by other Afghan troops at the scene.

Afghan Defense Ministry spokesman Sayed Javid Ghafoor confirmed her account.

Speaking by phone, he said the attack happened at a base in Kabul where foreign troops provide training for Afghan forces.

The motive for the shooting — the second insider attack at a base against foreign troops in less than two weeks — was not immediately clear.

The Taliban praised Saturday’s attack, saying it was conducted by a “sensible” Afghan.

Foreign troops for days had avoided visiting Afghan bases because of the threat of insider attacks, after a Czech soldier was gunned down on Oct. 22 by an Afghan forces commando just days after a top Afghan regional police commander was killed by a gunman in an Afghan army uniform.

In the wake of those attacks, U.S. military officials said they had halted most face-to-face contact with members of the Afghan security forces and had temporarily withdrawn from Afghan security facilities.

The latest assaults have raised new concerns over attacks against coalition personnel by Afghans in uniform. Since 2008, such attacks have left more than 150 U.S. or coalition troops or contractors dead and wounded about 200.

Insider attacks peaked in 2012 but have since declined steadily, with added vetting of Afghan recruits, extra guards accompanying foreign advisers, and the withdrawal of most foreign troops. However, there have been several such deadly attacks in the past two years, including some at the hands of highly trained Afghan commandos.