Panetta, in the Afghan capital, told reporters he was visiting Kabul to take stock of progress in the war and discuss plans for the troop drawdown. But he used a news conference to strike across the border instead, saying the Pakistani government needs to do more - and soon - to root out the al-Qaeda-linked Haqqani terrorist network.
Panetta repeatedly emphasized U.S. frustration with attackers crossing the border from Pakistan. It is essential that Pakistan stop "allowing terrorists to use their country as a safety net in order to conduct their attacks on our forces," he said alongside Afghan Defense Minister Abdul Rahim Wardak.
"We have made that very clear time and time again and we will continue to do that, but as I said, we are reaching the limits of our patience," Panetta said.
The United States clearly wants Pakistan to take on the Haqqanis before the bulk of U.S. troops have left the region by the end of 2014.
In Washington, Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, told a Pentagon news conference that the United States needs to continue working with Pakistan, despite frustrations.
"It's our view that those Haqqani, notably, the Haqqani network, is as big a threat to Pakistan as it is to Afghanistan and to us, but we haven't been able to find common ground on that point. So that's been very frustrating," he said.
He added that the United States is "extraordinarily dissatisfied with the effect that Pakistan has had on the Haqqanis," but also mindful that Pakistan has taken on other insurgent groups at great cost to its own troops.
Panetta's remarks capped a week of some of the boldest language and actions by the administration against its stated ally. Just a day before, he stood in the capital of Pakistan's arch rival, India, and declared that drone strikes against terror suspects would continue, dismissing Pakistan's claims of sovereignty by noting that U.S. sovereignty was jeopardized by terrorists as well.
A senior U.S. official acknowledged Thursday that the recent increase in drone strikes on insurgents in Pakistan - targeting mostly al-Qaeda but other militants as well - is partly a result of frustration with Islamabad. The official spoke on condition of anonymity to discuss sensitive operations.
And earlier this week, NATO sealed agreements to ship tons of supplies out of Afghanistan through northern and western countries, bypassing Pakistan, which has kept its borders closed to NATO trucks in response to the killing of 24 Pakistani troops by NATO forces.