A suicide bomber has detonated an explosives-packed truck at the entrance to a compound housing foreigners in Kabul, killing at least two Afghan guards, officials said.

The Taliban claimed responsibility for the Tuesday morning blast, which shook windows across the Afghan capital and sent a plume of smoke into the sky over the east of the city.

Al Jazeera’s correspondent in the Afghan capital said the mini truck bombing happened in front of a compound that was guarded by both foreign and Afghan security personnel and housed facilities for foreign contracting companies.

The blast rattled windows in the heart of Kabul's diplomatic quarter and sirens were soon heard wailing.

"It was a bomb in a small truck at the gate of a foreign base. Initial reports show two guards killed, several wounded," Najib Danish, deputy spokesman for the ministry of interior, told the AFP news agency.

"The guards were Afghan. After the blast, two other attackers tried to enter the base and were killed by guards."

The latest blast comes two days after Afghan lawmaker Shukria Barakzai escaped a suicide blast in Kabul as she drove in a convoy near parliament. Three civilians died in that attack.

Kabul has been hit by regular suicide attacks in recent years, often against the US-led military force fighting the Taliban since 2001.

The NATO force is ending that war next month and pulling out, though about 12,500 troops will remain to support the Afghan army and police whio will take full responsibility for imposing security nationwide.

Source: Al Jazeera and agencies