He did not say what specific roles the seven played in the attack and it was unclear what impact the arrests would have on Taliban operations in the capital, which is far more peaceful than many other parts of the country.
Ansari said the seven were under the command of the Taliban's "shadow governor" of Kabul, Daoud Surkha, who the Afghans allege is hiding in Pakistan. He said the cell was responsible for at least seven other attacks in the capital since last year, including the February assault against guesthouses frequented by foreigners in which six Indians were killed.
Previously Ansari said the February attack was carried out by the Pakistan-based insurgent group Lashkar-e-Taiba, which India blames for the 2008 attacks in Mumbai that claimed 166 lives.
"We are saying that they have been trained on the other side of the border, so it is clear that the intelligence service of our neighboring country has its role in the training and supporting of this terrorist group," he said in a clear reference to Pakistan's Inter-Services Intelligence Agency, which maintained close ties to the Taliban years ago.
Taliban fighters still use the lawless areas along Pakistan's border with Afghanistan as a sanctuary despite Pakistani military operations and U.S. drone attacks.
In Islamabad, Pakistan's Foreign Ministry spokesman Abdul Basit called the allegation of involvement by his country's intelligence service "all baseless and groundless."
"We are committed that our soil is not used for terrorist actions anywhere in the world and we hope others are committed to that also," Basit told The Associated Press.
The recent attacks in Kabul and against the bases appeared to be the Taliban's response to NATO's plans for a major operation in the coming weeks in the Taliban southern stronghold of Kandahar -- and an attempt at demonstrating that the insurgents are capable of pressuring the coalition in several parts of the country.
Sixteen insurgents and one U.S. contractor were killed in the Bagram attack. NATO says a number of coalition soldiers were wounded in the Kandahar attack but gave no precise figures.
In the latest fighting, the Canadian Ministry of Defense announced that a 26-year-old Canadian soldier was killed Monday by a roadside bomb in southern Afghanistan.
Recent insurgent assaults also seemed to be a rebuff to President Hamid Karzai's plans to offer peace to militants willing to give up the fight. Karzai plans to roll out a program of jobs, training and financial help to insurgents willing to give up during a national conference, or peace jirga, set for June 2.
The Obama administration supports economic and other incentives to individual insurgents willing to end the struggle and abandon al-Qaida. But Washington is skeptical of peace talks with the Taliban leadership, hoping first to weaken the militants on the battlefield.
The jirga was originally set for early May but was postponed until after Karzai's visit earlier this month to Washington, where he discussed his plans with President Barack Obama and other top U.S. officials. The conference was rescheduled for this coming Saturday but slipped four days to allow delegates from remote areas to reach Kabul.
No Taliban figures are expected to attend but the 1,600 delegates are expected to include some insurgent sympathizers.
On Monday, the secretary of parliament, Mohammad Saleh Suljoqi, said 45 of the 249 lawmakers threatened to boycott the jirga unless Karzai responds to their demands, including submitting names of new Cabinet members to replace those rejected by the assembly last January.
Parliament refused to confirm 11 of the 25 nominees, but they have been serving ever since in an acting capacity. The jirga could proceed without the parliament members, but a boycott could call into question the degree of nationwide support for any decisions made during the conference.
Also Monday, officials in northern Afghanistan said insurgents on motorbikes shot and killed a tribal elder who planned to attend the June 2 conference. Tribal elder Horal Mohammad Zabet was killed Saturday while tending his sheep in Faryab province, officials said.
In the west, meanwhile, five Afghan civilians died Monday when their minivan hit a roadside bomb in Farah province, the Interior Ministry said. Eight people were also wounded, many in serious condition.