Afghan security forces have ended a siege by armed men of a building near Herat airport in western Afghanistan, police sources said.
A suicide bomber blew himself up early on Thursday morning near the gates of a private company that supplies NATO coalition troops based in Afghanistan.
Four other armed men stormed the building and fighting raged on for hours, according to a government spokesman.
Two private security personnel were killed and at least 10 people were injured, including two Italian soldiers.
The attackers, who were all killed, were equipped with explosives-packed suicide vests, rocket-propelled grenades and assault rifles, according to Mahuddin Noori, the provincial spokesman.
A spokesman for the NATO-led International Security Assistance Force (ISAF) said the attack against contractor Esko was about one kilometre from the NATO base in Herat, the third largest city in Afghanistan.
The attack, latest in a spate of assualts across Afghanistan, comes as the government in Kabul mulls the second phase of transitioning security control from NATO to Afghan forces ahead of the 2014 withdrawal date for foreign troops.
Herat was one of the seven areas handed over to Afghan forces in the first phase of transition completed in July.
Hamid Karzai, the Afghan president, is expected to announce the second phase, which is believed to cover 17 provinces across Afghanistan.