Militants attacked the U.S. service members as they were patrolling Friday about 25 miles east of Kabul, a U.S. military statement said. An attack helicopter rushed to the site, but the rebels had fled.
The wounded were in stable condition after being evacuated to Bagram, the main U.S. base in Afghanistan, about an hour drive north of Kabul, the statement said.
Attacks on the U.S. military so close to Kabul are rare and Friday's assault occurred less than a week after a roadside bomb in the capital blew up near a convoy of U.S. Embassy vehicles, wounding two American staff members.
The assaults come amid a major upsurge in attacks by Taliban-led rebels that have left more than 1,100 people dead in the past six months. They also come less than a month before landmark legislative elections, which the insurgents have vowed to subvert.
In the latest attack directly linked to the polls, gunmen on Sunday ambushed a parliamentary candidate, Adiq Ullah, as he was driving in Uruzgan province, killing him and wounding two others in his vehicle, said provincial Gov. Jan Mohammed Khan.
He blamed the Taliban for the murder. Security forces pursued the insurgents, but they escaped, the governor said.
Ullah's killing brings to four the number of candidates killed in the lead-up to the polls. Four election workers have also been murdered and several election offices have been rocketed.