The Taliban claimed the attack near Bagram airfield, America's largest base in the country.
The Taliban claimed the attack near Bagram airfield, America's largest base in the country. It comes a few days after another insurgent blew himself up outside the military facility over a US propaganda leaflet deemed highly offensive to Muslims.
The attack follows the Taliban's vow to turn Afghanistan into a "graveyard" for foreign forces after US President Donald Trump pledged to keep American troops in the country indefinitely.
"We had two US soldiers wounded and their injuries are not life-threatening," Navy Captain William Salvin, a spokesman for US forces in Afghanistan, told AFP.
Parwan provincial police chief Mohammad Zaman Mamozai told AFP that three civilians were also wounded in the attack.
The Taliban, which ruled the war-torn country from 1996-2001, claimed responsibility for the latest assault in a WhatsApp message sent to journalists, saying 24 "invaders" had been killed and injured, and three military vehicles destroyed.
The militants routinely exaggerate battlefield claims.
It is not clear if the attack is also linked to the leaflet drop in the northern province of Parwan, where Bagram is located.
The leaflet depicted a lion chasing a white dog -- the same colour as the Taliban's flag -- with the Islamic statement of faith -- "There is no God but Allah, and Mohammad is the messenger of Allah" -- superimposed on its body.
Dogs are seen as unclean creatures by some Muslims and the association of Islam with a canine in deeply religious Afghanistan angered many people.
Major General James Linder, who heads the US and NATO special operations forces in Afghanistan, apologised for the leaflet design, which he said was an "error".