Taliban militants claimed responsibility for the attack in the city of Ghazni, where US forces have waged fierce battles against the Taliban for months.
"Three U.S. service members were killed and three wounded when an improvised explosive device detonated November 27 near Ghazni city".
One American contractor was also wounded.
According to the statement, the injured soldiers have already been evacuated and received medical care.
The Taliban claimed responsibility for the attack near the city of Ghazni, capital of the central Afghanistan province, according to the Associated Press.
U.S. Army Ranger Sgt. Leandro Jasso, 25, from Leavenworth, Wash., was wounded by small arms fire while conducting an operation to eliminate Al Qaeda militants in Nimruz Province, located in the southwest part of Afghanistan. "We've lost some troops doing it over the last several months, as you know", but Afghan troops since 2014 have taken the lead in the fighting and have suffered far more casualties.
The soldier's death follows a spate of so-called "insider attacks" that have rattled foreign troops tasked with training and assisting Afghan security forces.
Worldwide forces have also suffered from so-called insider attacks in recent months, in which Afghan soldiers or police have opened fire on them.
Since the start of 2015, 58 Americans have been killed, President Ashraf Ghani said earlier this month. In August 2017, U.S. Defense Secretary Jim Mattis signed orders to bring additional troops to fight in Afghanistan.
About 14,000 U.S. troops remain in Afghanistan as part of Resolute Support and a separate counter-terrorism mission aimed against militant groups such as al Qaeda and Islamic State.
American-led combat operations against the Taliban officially ended in 2014, but some USA troops remain in the country to provide training and assistance to Afghan forces, which do most of the fighting.
Before that, six USA service members were killed in a motorcycle bomb explosion, also claimed by the Taliban, in December of 2015.