In one of the deadliest assaults on foreign troops in Afghanistan this year, three U.S. service members were killed and three more wounded by an explosive on Tuesday, in an attack claimed by the Taliban.

According to the NATO-led Resolute Support Mission, an improvised explosive device detonated near the central city of Ghazni. One American contractor was also wounded.

Ghazni, which briefly fell to the Taliban earlier this year, is less than 200 miles from the capital Kabul.

The Taliban have claimed responsibility for the latest attack.

The statement added the wounded service members and contractor are receiving medical treatment.

Earlier in the day, NATO announced that a U.S. soldier killed last week while fighting al-Qaeda in Afghanistan in the Nimroz province bordering Iran lost his life due to “unintentional” fire from an Afghan soldier.

Since the formal end of the combat mission in 2014, most foreign troops are now only engaged in training missions, except for U.S. forces, who continue to provide support to Afghan forces along battle fronts.

Last month, Brig. Gen. Jeffrey Smiley, the commander of American forces in southern Afghanistan, died after a Taliban infiltrator opened fire in a gathering of Afghan and U.S. officials in the Kandahar province, in an attack that also claimed the province’s police and intelligence chiefs.

With the latest casualties, there have been 12 U.S. and four other coalition service members lost due to combat action this year, Maj. Bariki Mallya, spokesperson for the mission, told Anadolu Agency.

Afghan President Mohammad Ashraf Ghani said last week that over 28,000 Afghan security personnel and 58 U.S./NATO forces have lost their lives since 2015.