The violence in the eastern province of Paktia, which borders Pakistan, started at around 2:00am (2130 GMT Wednesday) and raged for several hours.
One security guard who survived told AFP that "hundreds" of Taliban had swamped the compound, forcing him and two colleagues to hide with guns and a few bullets so they could kill themselves if they were found.
The attack led to the highest death toll in a single Taliban operation since they struck at a bank in Jalalabad, also in the east, in February, killing 38 people.
"Thirty-six of our staff were killed in last night`s attack," said Noorullah Bidar, director of the Afghan company targeted, Galaxy Star.
"They (the Taliban) destroyed a lot of our equipment including vehicles and equipment used for road construction.
"We don`t know why they attacked us... they are doing this to prevent reconstruction in Afghanistan."
Bidar added that staff from his company working on a different stretch of the same road in Paktia were attacked in 2009 by a suicide bomber who killed 16 workers.
Paktia provincial spokesman Rohullah Samoon put the death toll at 35 guards and staff, adding that 20 more were wounded.
Mohammad Ali, a guard for the company, told of how he was manning a security post at the compound when the Taliban started firing "from every direction."
"I believe there were hundreds of them," he said.
"Me and two of my friends managed to retreat to a room and hid ourselves in a hole in that room.
"We had only one bullet each left and we had kept them for ourselves because we know that Taliban brutally murder their prisoners."
Taliban spokesman Zabihullah Mujahid said it carried out the attack, killing 40 people and torching four vehicles.
He did not mention any Taliban casualties. The militia is known frequently to exaggerate its claims.
The militants have made Afghan government projects a prime target in a bid to undermine the authority of President Hamid Karzai`s administration and have repeatedly kidnapped foreign road construction workers from camps in the past.
Karzai condemned the attack as "cowardly," saying it showed the militants did not want development in Afghanistan.
The Taliban have been waging a 10-year battle to evict foreign troops stationed in Afghanistan in the wake of the 2001 US-led invasion that toppled their extremist Islamist regime from power for sheltering Osama bin Laden.
The attack comes a few weeks after they announced the start of their annual spring offensive at the end of April.
There are currently around 130,000 US-led international troops in the troubled country although limited troop withdrawals are due to start from a handful of safer areas in July.
This is ahead of a scheduled full withdrawal of combat troops in 2014, although there have been calls for this timetable to be speeded up in the wake of the killing of the Al-Qaeda leader by US forces in Pakistan on May 2.
US Secretary of Defence Robert Gates said this week that accelerating troop withdrawals from Afghanistan because of bin Laden`s death would be "premature".
Paktia, which borders Pakistan`s lawless border regions where Taliban are known to have rear bases, is a highly volatile province frequently hit by violence and cross-border attacks. (*)
Editor: Kunto Wibisono
Copyright © ANTARA 2011