The embassy attack in Kabul killed more than 50 people
Pakistan's government has denied that its spy service, the ISI, was involved in last month's deadly bombing of the Indian embassy in Kabul.
Government spokeswoman Sherry Rehman was responding to media reports that Taleban sympathisers within the ISI had helped in the deadly attack.
She also said there would be no purge of the ISI.
This appeared to directly contradict an earlier statement which she made to the AP news agency.
Ms Rehman had been quoted as saying: "Years of backing an anti-Soviet jihad has left its mark.
"There are probably still individuals within the ISI who are ideologically sympathetic to the Taleban and act on their own in ways that are not in convergence with the policies and interests of the government of Pakistan.
"We need to identify these people and weed them out."
However, Ms Rehman later said that she had been quoted out of context by the news agency.
Speaking shortly afterwards to the BBC Urdu service, she said: "There is no question of any purge in the ISI.
"The government has already stated that there are no links or evidence of ISI involvement in the Kabul bombing. It was in the past during the Soviet jihad that a few pro-Taleban elements had found their way in, and with the change in policy have been firmly been rooted out."
The BBC contacted Pakistan's army spokesman Maj Gen Athar Abbas but he would not respond to Ms Rehman's comments.
Other Pakistani officials roundly rejected any ISI involvement in the Kabul blast.
"It's rubbish. We totally deny it," foreign ministry spokesman Mohammad Sadiq told AFP.
The embassy attack was the bloodiest in Kabul since 2001
When asked about the allegations as he attended a South Asian summit in Sri Lanka, Foreign Minister Shah Mehmood Qureshi also said it was "rubbish".
The BBC's M Ilyas Khan in Karachi says that on several occasions in recent weeks Pakistan's civilian government has embarrassed itself by issuing important orders and statements that it has had to retract within hours.
Last Saturday night it said the ISI would be brought under the control of the interior ministry.
But the decision was revoked within hours, apparently following intervention from the army.
More than 50 people were killed in the embassy blast in Kabul, including two senior Indian diplomats.
It was the bloodiest explosion in the Afghan capital since the Taleban were driven from power in 2001.
US officials had claimed that spies in the ISI had helped plan the suicide attack.
The allegations - reportedly based on intercepted communications - were made in briefings to the New York Times and the Washington Post.
The New York Times reported that a senior CIA official had visited Pakistan last month to confront Islamabad over links between the ISI and Islamic extremists.