Gunmen on Wednesday assassinated a brother of Afghanistan's national security adviser Rangin Dadfar Spanta outside a public bathhouse in the family's relatively peaceful home province, police said.

The Taliban claimed responsibility for the killing of Wali Jaan, a public prosecutor in the small town of Karukh in the western province of Herat which borders Iran.

"Today at around 8:30 am (0400 GMT) Wali Jaan, the brother of Dr Spanta, was gunned down. He was attacked by two persons on a motorbike as he came out of a (public) bath," Herat police spokesman Abdul Rauf Ahmadi told AFP.

"The attackers fled the area," he added.

Herat police chief Rahmatullah Safi confirmed the killing but gave no further details.

Taliban spokesman, Yousuf Ahmadi called AFP from an unknown location and said the insurgent militia was responsible.

"This person... who has worked with the government over the last four years was killed in a guerrilla attack by one of our mujahideen in Herat," Ahmadi said.

"He was a key government official," he added.

Spanta is one of the most influential people in the Western-backed government. He served as foreign minister before becoming national security adviser to President Hamid Karzai.

Taliban insurgents have carried out attacks in Herat since the 2001 US-led invasion brought down their regime in Kabul, but most of their activity is concentrated elsewhere.