Two foreign contractors, one of them an American, were killed in a suicide attack on an Afghan police training centre in the southern city of Kandahar on Monday, the US embassy said.
Three militants armed with bombs and guns were also killed in the attack by the suicide squad, but Afghan officials earlier reported there had been no other casualties.
"Two contractors were killed, one was American. The second one was from a third country," US embassy spokeswoman Caitlin Hayden told AFP.
One of the rebels detonated a bomb-filled car along the wall of the facility in a bid to punch open a route for his comrades, the interior ministry said in the capital Kabul.
The two others were shot dead by police guards outside the training centre, ministry spokesman Zemarai Bashary told AFP.
"We had three suicide bombers killed," Bashary said, adding that the bombers failed to penetrate the walled facility.
The US embassy's Hayden said it was not yet clear how the contractors were killed.
An AFP reporter said the explosion knocked down part of the wall.
There was no claim for the bombing but similar attacks have in the past been blamed on the Taliban, which is leading a nearly nine-year insurgency to bring down the Western-backed government and evict 130,000 US-led foreign troops.
Kandahar is the focus of a mounting US-led push against the Taliban in their spiritual homeland, as part of a counter-insurgency strategy that US President Barack Obama hopes can allow American troops to start withdrawing next year.