It was supposed to be the first meeting of peace and reconciliation among Afghanistan's many varied tribes and factions, reports CBS News correspondent Mandy Clark, but just minutes after Karzai began his opening address to some 1,600 dignitaries, the attack began with rocket fire.
No delegates were harmed but at least two attackers were killed in fighting with Afghan security forces near the giant tent erected for the three-day gathering, officials said.
The Taliban claimed responsibility for the attack in a phone call to The Associated Press.
The conference, known as a peace jirga, continued. Karzai hopes it will bolster him politically by endorsing his strategy of offering incentives to individual Taliban fighters and reaching out to the insurgent leadership, despite skepticism in Washington about whether the time is right for an overture to militant leaders.
But the attack underscored the weak grip of Karzai's government in the face of the Taliban insurgency, which has strengthened despite record numbers of U.S. forces in country.
"My dear Taliban, you are welcome in your own soil. Do not hurt this country, and don't destroy or kill yourselves," Karzai told the some 1,600 delegates in his opening address, which was broadcast nationally on state television.
But he said militants who caused the deaths of Afghans - an apparent reference to al Qaeda leaders - deserved no sympathy. "Those people who are killing innocents, punish them," Karzai said.
Karzai said years of violence and infighting had driven thousands of Afghans to join the Taliban and another major insurgent group, Hizb-i-Islami, out of fear.
He said continuing fighting would only prevent the withdrawal of international forces from Afghanistan.
"Make peace with me and there will be no need for foreigners here," Karzai said.
About 10 minutes into his speech, Karzai was briefly interrupted by an explosion outside, which police said was a rocket. Karzai heard the thud, but dismissed it, telling delegates, "Don't worry. We've heard this kind of thing before."
An AP reporter nearby heard a loud explosion and saw smoke rising from a second apparent rocket that struck about 100 meters (yards) from the venue. Bursts of gunfire could be heard to the south of the tent.
Farooq Wardak, a government minister who is jirga chairman, said three militants dressed in burqas, carrying explosives and armed with guns and at least one grenade launched the attack from a building about one mile (1.5 kilometers) from the venue.
Two died in fighting and one was captured, he said. However, Interior Ministry spokesman Zemeri Bashary said all three attackers were killed.
Kamaluddin, a police officer in the area where the conflict happened who uses one name, said one of the attackers blew himself up during the battle.
Abdul Gaffar Saidzada, chief of criminal investigation for Kabul police, said three police were wounded in the fighting. Hospital official Sayed Kabir Amiry said two civilians were admitted with wounds inflicted in Wednesday's attack.
Taliban spokesman Zabiullah Mujahid gave a slightly different account of the attack - that four suicide attackers disguised in Afghan army uniforms had opened fire in an attempt "to sabotage and destroy this peace jirga."
While militants are strongest in the volatile south of the country, where NATO forces are preparing a major operation in the Taliban stronghold of Kandahar, insurgents have repeatedly shown they can strike in the heavily defended capital as well.
"Unfortunately this shows the weakness of the government, and the weakness of the security forces, that they were unable to provide enough security for this consultative peace jirga," said Abdul Sattar Khawasi, a lawmaker attending from Parwan province.
One prominent rights activist was skeptical the conference could help bring peace. Delegates include individuals with links to militants but not active members of insurgent groups.
"I'm not very hopeful that we will come up with a workable mechanism to go for peace. The reason is we don't have the opposition with us. It's obvious from their attacks," said Sima Samar, the head of the Afghan Human Rights Commission.
Wardak rejected Taliban claims the jirga was stacked with Karzai supporters and designed to rubber-stamp the president's plans for reconciliation.
"This jirga is to advise the government who we can talk to and who we cannot talk to," he said.
The Obama administration supports overtures to rank-and-file insurgents but has been skeptical of a major political initiative with insurgent leaders, believing that should wait until accelerated military operations have weakened the Taliban on the battlefield. U.S. officials believe Taliban leaders have little reason to negotiate because it believes it is winning the war.
In London, the Ministry of Defense said a British marine was killed Wedneday in an explosion while on a joint patrol with Afghan forces in southern Helmand province.
And NATO announced it had captured the Taliban's "shadow governor" of northeastern Baghlan province on Monday, one day after killing his predecessor in an airstrike.