Pakistan's government said Friday it needs to purge Taliban sympathizers from the country's main intelligence agency but angrily denied a report that the agency helped plan a bombing that killed at least 41 in Afghanistan.

The New York Times reported that American intelligence agencies have concluded that members of Pakistan's powerful Inter-Services Intelligence were involved in the July 7 attack on the Indian Embassy in Kabul.

The report cited unnamed U.S. government officials. It said the conclusion was based on intercepted communications between Pakistani intelligence officers and militants who carried out the attack.

Pakistan's Foreign Ministry spokesman Mohammed Sadiq described the report as "total rubbish," saying there was no evidence of ISI involvement.

"The foreign newspapers keep writing such things against ISI, and we reject these allegations," he said by telephone from a summit of South Asian leaders in Sri Lanka.

Government spokeswoman Sherry Rehman also said there was "no proof" of ISI involvement in the bombing.

However, she said that there were "probably" individuals in the ISI working against official policy — the first acknowledgment from Pakistan's new government that Taliban sympathizers may lurk in the agency.

Authorities "need to identify these people and weed them out," Rehman said.

Afghanistan has long accused the ISI of backing the Taliban-led insurgency wracking the country, despite Pakistan's support of the U.S.-led war on terror. The embassy bombing was the deadliest in Kabul since the 2001 ouster of the Islamist regime in a U.S. invasion.

Last week, India accused "elements of Pakistan" of being behind the blast and said it had put the four-year-old peace process between historic rivals India and Pakistan — who have fought three wars since they won independence from Britain 60 years ago — "under stress."

A Bush administration official told The Associated Press on Wednesday that U.S. intelligence agencies suspect rogue elements in ISI of giving militants sensitive information that helps them launch more effective attacks from Pakistan's tribal regions bordering Afghanistan.

The official said that top CIA and U.S. military officials, including CIA Deputy Director Steve R. Kappes, traveled to Pakistan five days after the Indian Embassy attack to press their misgivings about apparent ties between militants and some mid-level ISI officials, amid mounting evidence initially collected by the United States and then corroborated by Indian intelligence.

A U.S. counterterror official said some Pakistani intelligence officers' support for the Jalaluddin Haqqani network, associated with both the Taliban and Al Qaeda, is of particular and long-standing concern.

The New York Times report cited American officials as saying the embassy attack was probably carried out by members of the Haqqani network.

The report did not specify what kind of assistance the ISI officers allegedly provided to the militants, but said they had not been renegades, indicating that their actions might have been authorized by superiors.

This week, President Bush publicly praised visiting Prime Minister Yousuf Raza Gilani as a strong ally against terrorism. But according to a report in Pakistan's The News daily, Bush expressed concern over ISI elements leaking information to militants and asked Gilani who was controlling the spy agency.

The report quoted Pakistan's Defense Minister Chaudhry Ahmed Mukhtar.

ISI, which has been an important partner of the U.S. in capturing top Al Qaeda suspects since 2001 — including 9/11 attacks mastermind Khalid Sheikh Mohammed — is formally under the control of Pakistan's prime minister, but all its senior officials are army officers.

On the eve of Gilani's visit to Washington, the government announced the powerful agency would now report to the interior minister — the top civilian security official — only to backtrack hours later. That confusion had led to pointed criticism of the government, which has struggled to define a coherent strategy for combating Islamic militancy since it took office after defeating supporters of President Pervez Musharraf in February elections.

The government has pursued peace deals with militants and tribes in Pakistan's volatile northwest. NATO and U.S. military complain that the talks and accompanying cease-fires have freed up militants to mount attacks across the border into Afghanistan.

American officials also worry that the lack of military pressure on militants inside Pakistan will only allow them to build their strength and give Al Qaeda a chance to plot another 9/11-style strike in the West.