The Pentagon said Thursday it is "deeply concerned" by a rash of attacks in which NATO soldiers have been shot by their supposed allies in the Afghan security force.

Pentagon spokesman Capt. John Kirby confirmed that "several" U.S. soldiers were injured in Wardak province earlier this week after an Afghan wearing a soldier uniform began shooting at the troops. Officials have said a total of five Americans were shot in the attack -- Kirby said they are in "stable condition," though the attacker "fled the scene and is still at large."

The attack was just the latest incident where Afghan security forces have targeted NATO trainers and partners.

The number so far this year is quickly approaching the tally for all of 2011. The Pentagon recorded a total of 19 attacks involving 26 deaths, 13 of them American, as of early July. In 2011, according to Kirby, there were 21 attacks and 35 deaths.

"We continue to be deeply concerned about the insider threat," Kirby told reporters at the Pentagon on Thursday.

The insider attacks have undermined the trust between allies and efforts to prepare Afghan troops to take over their own security as international combat troops prepare to withdraw.

In the latest incident, a witness said Afghan civilians were talking to the soldiers outside their base when a man in an Afghan army uniform opened fire on them with a machine gun.

He added that the wounded soldiers were evacuated by helicopter, while the others "took us aside in fear of a possible gun battle." Eman, who gave only one name, said the Afghan who opened fire escaped toward some trees and into a nearby village.

Wardak, located close to Kabul, is considered a Taliban hotbed and has been the scene of heavy fighting over the past year.

On last year's anniversary of the Sept. 11, 2001, terror attacks, a truck bomb outside the same coalition base wounded 77 American soldiers and killed five Afghan civilians. The area is also seven miles east of the Tangi Valley, where the Taliban on Aug. 6 shot down a U.S. military helicopter, killing 30 Americans -- the deadliest single loss for American forces in the decade-old war.

Efforts to draw down the number of U.S. and other foreign troops in Afghanistan rely on them working closely with their Afghan partners to train and mentor them so that they can take over the security of their country by the end of 2014. But such insider attacks fuel distrust and have triggered increased security protections for foreign troops serving in Afghanistan.

A total of 221 foreign troops have been killed this year, including five in July.

Fox News' Jennifer Griffin and The Associated Press contributed to this report.