Updated

Afghanistan blamed a foreign intelligence agency Tuesday for the bombing of the Indian Embassy in Kabul, making a veiled but clear reference to its eastern neighbor, Pakistan.

The accusation came as the commander of the NATO military mission in Afghanistan, U.S. Army Gen. David D. McKiernan, said increased Afghan violence is due in part to a porous border that allows insurgents to resupply in Pakistan and cross freely into Afghanistan.

President Hamid Karzai's spokesman said Afghan officials have evidence showing foreigners were behind Monday's suicide bombing at the embassy that killed 41 people, the deadliest attack in the capital since 2001. He did not provide any specifics.

Click here for photos.

Humayun Hamidzada did not mention Pakistan's intelligence agency by name but told reporters it was "pretty obvious" who was behind the attack. Afghanistan previously blamed Pakistan's Inter-Services Intelligence, or ISI, for a recent assassination attempt on Karzai.

"The sophistication of this attack, and the kind of material that was used in it and the specific targeting, everything has the hallmark of a particular intelligence agency that has conducted similar terrorist acts inside Afghanistan in the past. We have sufficient evidence to say that," Hamidzada said.

"The project was designed outside Afghanistan. It was exported to Afghanistan," he added.

Among the blast's victims were four Indians working in the embassy, including the military attache and a diplomat.

Pakistan's prime minister denied its intelligence service was responsible. Speaking in Malaysia on Tuesday, Syed Yousuf Raza Gilani said his country has no interest in destabilizing Afghanistan when both countries are fighting terrorist groups.

"We want stability in the region. We ourselves are a victim of terrorism and extremism," Gilani said on the sidelines of a summit of eight developing Islamic nations.

His government has condemned Monday's attack, saying it wants to push forward with a four-year effort to reach peace with longtime rival India.

But Gilani's comments were unlikely to bridge a growing divide in Afghan-Pakistan relations. Afghanistan's latest allegation came only weeks after Karzai threatened to send Afghan troops after Taliban leaders purportedly hiding in Pakistan.

U.S. officials have blamed rising violence in Afghanistan on peace deals that Pakistan's new government has negotiated in its tribal regions along the border. June was the deadliest month in Afghanistan for foreign troops since the U.S.-led invasion ousted a Taliban regime in late 2001.

McKiernan, the NATO commander, said he believes Pakistan's military leadership recognizes it has a problem with militant groups in the tribal regions along the frontier with Afghanistan.

"I think there is a continuing issue of the very porous border with Pakistan, and it has allowed insurgent militant groups a greater freedom of movement across that border, a greater freedom to resupply, to provide leadership, to provide manning across that border," McKiernan told The Associated Press in an interview Sunday.

Abdul Hamid Mebarez, a political analyst who was formerly deputy minister of Afghanistan's Information and Culture Ministry, said Afghan officials have ratcheted up warnings to Pakistan because diplomatic approaches didn't produce results.

"It didn't work and the situation got very bad, so pressure from the Afghan people made Karzai show a strong reaction against Pakistan publicly," Mebarez said.

He also criticized international troops for failing to stop militants crossing the border. Foreign forces "are here with all their equipment and high technology, and they know that Pakistan or the ISI is behind all these terrorist activities in Afghanistan, and still they can't do any thing against them."

Afghanistan often accuses Pakistani intelligence of supporting the Taliban insurgency, a charge denied by Pakistan's leaders. Pakistan contends it is being blamed for the failings of Karzai's government, which is widely criticized by Afghans as ineffective and corrupt. Pakistan says Karzai should address the grievances of the Pashtun ethnic minority from which the Taliban draws its recruits.

Pakistan was once a key backer of the Taliban regime in Afghanistan, but formally abandoned its support after the Sept. 11 attack on the United States. Still, Taliban leaders are suspected of getting shelter and support in Pakistan's religiously conservative tribal region, where many people are sympathetic to the Islamic militant group's philosophy.