An Afghan official says the chief prosecutor for Herat province has been shot and killed by unknown gunmen in western Afghanistan.

Ghulam Jilani Farhad, a spokesman for the provincial governor, says Samiuddin Raheein was killed close to his home in the city of Herat. He says gunmen opened fire on the chief prosecutor from a car, and then Raheein was shot seven times.

Raheein's seven-year-old son was wounded in the attack.

Afghan government officials and judicial authorities often come under attack in the country, which is facing a 14-year militant insurgency.