KABUL, Afghanistan -- An Afghan soldier opened fire on U.S. troops on Sunday, wounding at least seven, the U.S. military said. No U.S. service members or foreign fighters were killed in the attack.

It was the second such insider attack by an Afghan soldier in the past week.

Abdul Qahar Araam, spokesman for the 209th Army corps, confirmed that an insider attack took place at a camp in Mazar-e Sharif. Araam said the soldiers returned fire and killed the attacker.

Get Breaking News Delivered to Your Inbox

Gen. Dawlat Waziri, spokesman for the Afghan Defense Ministry, also confirmed the attack.

The Pentagon said in a statement that U.S. service members were wounded and "evacuated for treatment." It said one Afghan soldier was killed and one wounded.

Taliban spokesman Zabihullah Mujahid praised the attack in a statement sent to the media. But he did not claim Taliban responsibility.

Last week, three U.S. soldiers were killed by an Afghan soldier in eastern Nangarhar province. In that case Mujahid claimed that the shooter was a Taliban loyalist who infiltrated the army specifically to seek out opportunities to attack foreign soldiers.