Seven U.S. military service members were injured in an insider attack in Northern Afghanistan Saturday.
The NATO-led Resolute Support Mission said in a statement that no US soldier died in the assault, while the attacker was killed in a retaliatory fire.
Two suspected insider attacks have hit USA troops in Afghanistan - just as Pentagon officials are deciding whether or not to send more troops to the country.
In April, scores of Afghan soldiers were killed when fighters breached security at the camp, detonating explosives and shooting hundreds at a mosque and dining hall on the base.
On Thursday, the Pentagon said it will send almost 4,000 additional troops to Afghanistan in order to stop Taliban advances.
No US military troops were killed, the mission said in a statement.
General Dawlat Waziri, a spokesman for the Afghan Defence Ministry, also confirmed the incident. The Taliban claimed the commando had been an infiltrator, but Afghan officials said it appeared to have been the outcome of a personal dispute.
Civilians as well as officers were wounded both in the gun battle and the auto bomb's blast, Danesh said. "Mattis has repeatedly stressed that increasing the number of US troops in Afghanistan would take place within a broader, long-term strategy for stabilizing Afghanistan", the Post reported.
US military officials have expressed growing concern about the war and urged that several thousand more USA troops be sent to shore up Afghan forces. The others held out against Afghan special forces that had responded to the attack, he said. The gunman - an Afghan - had been shot and killed, the spokesman said.
The Pentagon is set to announce it is sending another 4,000 USA troops to the country to counter the increasingly aggressive insurgents.