“After all, the United States is investing billions and billions of dollars in Pakistan,” Mr. McCain said on the ABC program “This Week.” “And taxpayers have a right to have a return on that.”

He said “the most frustrating aspect of this whole issue” was ISI’s continuing relations with two insurgent organizations, the Taliban and the Haqqani network, a Taliban ally based in the Pakistan tribal area of North Waziristan. “So it seems to me that to restore our confidence in our relationship with Pakistan, they have to make certain steps,” Mr. McCain said. “And we have to sort of set up some benchmarks as to what we expect.”

All four of the bomb factories — which made improvised explosive devices, or I.E.D.’s, the largest killer of American troops in Afghanistan — were evacuated before Pakistani security forces could take action against them. Information on two of the locations, in Pakistan’s tribal areas, was shared only in the past week, and insurgents packed up and left both sites within days.

A range of senior American intelligence officials, diplomats and military officers have visited Pakistan since the May 2 raid that killed Bin Laden; the mission outraged Pakistan’s government and citizens because it was carried out without first informing the government in Islamabad.

The goal of these high-level visits has been to halt the erosion of the relationship and to offer new opportunities for cooperation. Some have described those offers as tests of Pakistan’s will to be a full partner and act on shared information to pursue terrorists and insurgents.

The Pakistan military spy agency has arrested more than 30 people who fed information about the Bin Laden compound to the Central Intelligence Agency in the months leading up to the raid, fueling further distrust between the two nations.

On “This Week” on Sunday, Pakistan’s ambassador to the United States, Husain Haqqani, defended the arrests. “No one is being punished,” he said, adding: “When something like this happens, you want to know what happened and how, and who was involved.”