Two US soldiers have been killed by a suicide bomber who targeted a convoy of foreign forces in Afghanistan's southern province of Kandahar, according to security officials.

NATO confirmed in a statement the convoy was targeted on Wednesday in an attack that did "cause casualties".

"At around noon a car bomb targeted a convoy of foreign forces in Daman area of Kandahar," Zia Durrani, Kandahar province's police spokesman, said on Wednesday.

A US Pentagon spokesman confirmed that at least two casualties were US soldiers.

"Two US service members were killed in action in Kandahar, Afghanistan, when their convoy came under attack," Navy Captain Jeff Davis said.

"US Forces Afghanistan will provide additional information as it becomes available."

Qari Yusuf Ahmadi, a Taliban spokesman, claimed responsibility for the attack, saying it took place near an Afghan intelligence quick reaction force base in the Shor Andam area of Daman district.

READ MORE: Can the US defeat the Taliban in Afghanistan?

Witnesses reported seeing two foreign vehicles in the area on fire.

"The Taliban are very active in that area, and for the past few days there has been a lot of fighting between the group and Afghan security forces," Al Jazeera's Jennifer Glasse reported from Kabul.

"There is a lot of concern here about the growing violence in the country and anger [with people] wondering why the Afghan government cannot protect its people."

The combined US and NATO troop contingent currently in Afghanistan is about 13,500 troops.

The Trump administration is weighing whether to send about 4,000 or more US soldiers to Afghanistan in an attempt to halt Taliban gains.

Wednesday's attack came as Afghan authorities in Herat tightened security before a mass funeral for the victims of an attack in the western province that killed 29 and left 64 people wounded, 10 of whom are in a critical condition.

A suicide attacker opened fire inside a mosque packed with worshippers at evening prayers, before detonating his explosives.

The Islamic State of Iraq and the Levant (ISIL) on Wednesday claimed responsibility for that attack.