Mahuddin Noori, a spokesman for the governor in western Herat province, said five suicide bombers attacked the contractor`s compound, not far from a NATO base and the Herat airport.
The Taliban quickly claimed responsibility for the attack.
The insurgents first detonated a bomb near the entrance to the compound and then stormed the building. A gunbattle then followed as Afghan security forces and NATO-led troops fought back, Noori told reporters.
Two Afghan guards were killed and one foreign civilians was among five people wounded, he said. The attackers, who were all killed, were equipped with explosives-packed suicide vests, rocket-propelled grenades and launchers and assault rifles.
Reuters television pictures showed the bloodied bodies of at least two attackers lying on the ground surrounded by Afghan police and soldiers.
A spokesman for the NATO-led International Security Assistance Force (ISAF) said the attack against contractor Esko was about one kilometre from their Herat base.
Italian troops are mainly based in Herat, although ISAF could not confirm the identity of those wounded. Television pictures showed Italian army vehicles lining the wall outside the base.
The attack was the latest in a string of recent assaults across Afghanistan.
On Saturday, a suicide car bomber killed 13 ISAF troops and civilian employees, as well as four Afghans, in Kabul, the deadliest single ground attack against the coalition since the war began 10 years ago.
Another three Afghan civilians were killed in a suicide attack in the southern Afghan city of Kandahar on Monday, officials said.
Herat city was among the first seven areas where security was transferred from foreign troops to Afghan forces in July.
That marked the first step in a handover process that is due to end with all foreign combat troops leaving Afghanistan by the end of 2014.
In September, a roadside bomb killed 16 Afghan civilians in a van in Herat and a separate blast killed two Afghan policewomen and a civilian.
Violence across the country is at its worst since the start of the war 10 years ago, according to the United Nations, despite the presence of more than 130,000 foreign troops. (*)
Editor: Kunto Wibisono
Copyright © ANTARA 2011