Pakistan has lashed out at the US for accusing the country's most powerful intelligence agency of supporting extremist attacks against American troops in Afghanistan - the most serious allegations against Islamabad since the beginning of the Afghan war.