Three people were reportedly arrested by Afghan security forces.
Security forces were still attempting to defuse possible landmines and bombs planted by the fighters, Samir Allawi, Al Jazeera's Afghan bureau chief, reported from Kabul.
A Taliban spokesman, speaking to Al Jazeera, said that two men and two women were killed during the firefight with government forces.
He said that the four had provided logistics and facilities for potential suicide bombers, but denied they had a role in the attack on Karzai last week.
Karzai escaped the attempt on his life at a military parade, but a member of parliament, the head of a minority group and a 10-year-old boy were killed, as well as three Taliban fighters.
"Their faces and the intelligence from the neighbours show that two of them were not Afghans," Amrullah Saleh, head of the National
Directorate of Security, said of those who died in the raid.
"They were foreigners, probably only of them is an Afghan."
He said there was evidence that the fighters had received orders for the attack on Karzai from sources in Pakistan's tribal belt, which borders Afghanistan.
"There were telephone numbers, exchange of messages and proof that they were receiving orders from across our borders. Whether they were receiving these guidance ordered by government of Pakistan or not, we have no proof," Saleh said.
Al Jazeera's correspondent Zeina Khodr said: "What we are seeing, since the beginning of this year, is more high-profile attacks by the Taliban."
With last week's assassination attempt and a strike on the Serena hotel last January in the diplomatic area of Kabul, the group seems to be using these attacks as a form of propaganda, she said.
"The very fact that we saw this first gun battle shows that the Taliban is quite strong in the capital Kabul," she said.