Afghan soldiers run after Taliban miltants open fire on a ceremony in Kabul, forcing President Hamid Karzai and the Canadian ambassador to scramble for cover.  Afghan soldiers run after Taliban miltants open fire on a ceremony in Kabul, forcing President Hamid Karzai and the Canadian ambassador to scramble for cover. (Musadeq Sadeq/Associated Press)

Canada has condemned Sunday's Taliban attack on a military parade in Kabul that left Afghan President Hamid Karzai and dignitaries, including the Canadian ambassador, scrambling for cover.

Foreign Affairs Minister Maxime Bernier said the attack, during ceremonies to mark the 16th anniversary of the overthrow of Afghanistan's Moscow-backed Communist government, won't affect Canada's support for Karzai's government or the Afghan people.

A spokesman for the Taliban said they had deployed six militants with suicide vests and guns to target the president.

Three militants were killed, the Taliban spokesman said.

Police in Kabul said three others were killed, among them an Afghan member of parliament and a 10-year-old child.

Afghan authorities have arrested about 100 people for questioning, officials said.

Taliban insurgents opened fire with automatic weapons, forcing Karzai, as well as government ministers and foreign diplomats, including ambassador Arif Lalani from Canada, to dive for cover.

Witnesses said the gunfire was followed by at least one smaller explosion, possibly caused by a hand grenade or a mortar, and Afghan security forces returned fire.

Two Afghan politicians were seriously injured, the presidential palace said.

Video footage showed them sitting about 30 metres from Karzai when shots were fired. One of the men slumped back in his seat, while the other lay on the ground.

Karzai was surrounded by bodyguards and rushed from the scene. He appeared on television two hours after the attack, which he said had been carried out by enemies of Afghanistan.

Joanna Nathan, an Afghanistan analyst for the International Crisis Group, told Reuters news agency that the attack was a propaganda victory for the Taliban. "It was flashed around the world, but further than that, it shows them penetrating what was obviously a high-security event."

Analysts have said the Taliban are growing increasingly audacious in recent attacks.

In January, militants stormed the heavily guarded Serena Hotel in the centre of Kabul, killing an American and a Norwegian journalist.