Documents published yesterday by Wikileaks and a threat matrix quoted today by the Guardian show that what U.S. officials have said publicly about Pakistan and terrorism often has not squared with what was happening behind the scenes.

The Guardian's revelation that U.S. interrogators at the Guantanamo Bay detention center ranked Pakistan's main intelligence agency as a threat on par with terrorist groups like Hezbollah and Hamas shows again just how fraught the relationship is between the two countries and how suspicious the U.S. has been of Pakistan for years. (The documents were initially obtained by Wikileaks and provided to several news outlets, but The New York Times, NPR and the Guardian obtained them separately. NPR and The Times collaborated to vet the documents, while the Guardian operated solo.)

Ever since the attacks of Sept. 11, 2001, the U.S. has treated Pakistan more like a "frenemy" than a friend. U.S. officials have often publicly praised Pakistan's efforts in the war on terror while privately complaining that the army and intelligence services should do more. Pakistan, and particularly the ISI, has been blamed for harboring some terrorists -- such as the country's former Taliban allies and the militant group run by Jalaluddin Haqqani -- while making scapegoats of others. Initially, U.S. assessments of the ISI blamed "rogue" elements for supporting terrorists, the documents show. But by 2007, that caveat seems to have been removed.

These aren't the first documents outlining U.S. suspicions -- U.S. military field documents released by Wikileaks last summer suggested that Pakistan allowed ISI agents to meet with the Taliban in secret strategy sessions. But these are the first documents showing that some U.S. officials actually equated the ISI with other known terrorist groups, hardly an indication of trust. There is a striking contrast between the documents and rosy comments made by U.S. officials at the time.

For instance, in June 2005, a document shows that officials hoped one detainee could provide information on corruption within the ISI and "its support to the Al-Qaida network." Weeks later, interrogators thought another detainee could provide information on how the ISI was supporting the efforts of Hezb-i-Islami, a terrorist group that stages attacks mainly in eastern Afghanistan.

Yet, also in June 2005, Christina Rocca, then the State Department's assistant secretary of South Asian affairs, told a U.S. House subcommittee: "Over the past three years, Pakistan's leaders have taken the steps necessary to make their country a key ally in the war on terrorism and to set it on the path to becoming a modern, prosperous, democratic state. As a result of forward thinking and acting, Pakistan is now headed in the right direction."

The Guardian quotes another document, called the "Joint Task Force Guantanamo Matrix of Threat Indicators for Enemy Combatants," dated September 2007, that lists the ISI among 36 questionable groups, including Egyptian Islamic Jihad, the Iranian intelligence services, and the Muslim Brotherhood. The document says that through associations with one of these groups, "a detainee may have provided support to Al Qaeda or the Taliban, or engaged in hostilities against US or coalition forces (in Afghanistan)," the Guardian account says. (The newspaper does not provide a link to that document.)

That same month, September 2007, Richard Boucher, who replaced Rocca in the State Department, told reporters that he believed that nobody in Pakistan wanted terrorism. "... (F)rom what I see in Pakistan, it's not just the army that's committed to fighting ... terrorism," he said. "It's not just the politicians. It's really the vast majority of the whole society."

So far, the ISI and Pakistani army officials have been publicly mum on the latest set of leaked accounts. But privately, who knows?

One point is clear -- the leak has the potential to further damage the already tense ties between the U.S. and Pakistan, especially after the debacle with the CIA's Raymond Davis this year and the ongoing debate over drone strikes. That could hinder what the U.S. is trying to accomplish, not only in Pakistan, but in neighboring Afghanistan. The disclosure could also undermine recent high-level meetings designed to patch up poor relations and soothe hurt feelings.