Afghan officials say at least three people have been killed and two others wounded in a suicide car-bomb attack that apparently targeted a foreign security company in Kabul.

The Taliban claimed responsibility for the blast that hit the Despechari area in the east of the Afghan capital in the morning of March 17.

Deputy Interior Ministry spokesman Nasrat Rahimi said the attacker "detonated himself before reaching the target."

The ministry said all those killed and wounded in the attack were civilians, with no casualties among the contractors.

Eyewitnesses confirmed that the victims were passersby and local workers.

“All those killed were barbers or shoeshine men. I was horrified when I saw their bodies," eyewitness Mohammad Osman told Reuters. The explosion damaged nearby buildings, he added.

Kabul has recently seen a spate of militant attacks claimed by the Taliban and Islamic State group.

Earlier this week, top U.S. commander in Afghanistan John Nicholson said security in the capital would be "the main effort" for international powers helping Afghan defense and security forces.

As part of its new regional strategy announced in August, Washington has stepped up assistance to the Afghan military in a bid to break the stalemate in the more than 16-year Afghan war and force the militants to the negotiating table.

Last month, Afghan President Ashraf Ghani offered to allow the Taliban to establish itself as a political party and said he would work to remove sanctions on the militant group, among other incentives, if it joined the government in peace negotiations.

In return, the militants would have to recognize the Kabul government and respect the rule of law.

But the Taliban has so far ruled out direct talks with Kabul and insisted it would only negotiate with the United States, which it calls a "foreign occupying force." The Taliban also says that NATO forces must withdraw before negotiations can begin.

The United States has refused to withdraw troops and insisted that the Afghan government must play a lead role in peace negotiations.