Updated

Defense Secretary Leon Panetta on Wednesday expressed frustration with Islamabad, warning that the U.S. will not allow the attacks on U.S. forces from Pakistan-based insurgents like the Haqqani network to continue.

Pointing to the 20-hour assault against the U.S. Embassy and NATO headquarters in Kabul that finally ended Wednesday, Panetta said it is unacceptable that the Haqqanis are able to launch such deadly attacks and then flee to safe havens across the border in Pakistan.

"The message they need to know is: we're going to do everything we can to defend our forces," Panetta told reporters traveling with him to San Francisco for meetings with Australian officials.

He refused to say whether the U.S. plans to take any new military actions, but there has been an escalating U.S. campaign of drone strikes into Pakistan's border regions.

"Time and again we've urged the Pakistanis to exercise their influence over these kinds of attacks from the Haqqanis, and we have made very little progress in that area," Panetta said. "I'm not going to talk about how we're going to respond. ... We're not going to allow these types of attacks to go on."

U.S. officials have blamed the Haqqani network for the nearly daylong assault on the heavily guarded Afghan capital. The attack left 27 dead, including police, civilians and attackers, officials said.

Panetta's remarks reflect growing U.S. impatience over Islamabad's reluctance to go after the Haqqanis, who are connected to both the Taliban and al Qaeda and present the most significant threat to Afghanistan's stability. U.S. officials have repeatedly pressed the Pakistanis to move against insurgent havens in the border region, including in North Waziristan.

The Haqqanis use the lawless territory to launch attacks against U.S. and Afghan forces across the border.

U.S. relations with Pakistan have been rocky amid complaints about the increased American drone attacks across the border. But they worsened after the U.S. special operations forces crossed into Pakistan in May to raid the Abbottabad compound where al Qaeda leader Usama bin Laden had been hiding for years. Bin Laden was killed in the raid, and Pakistani officials were angry about what they considered an assault on their country's sovereignty.

No NATO or U.S. Embassy employees were hurt in the Kabul attack that ended around dawn Wednesday. Eleven Afghan civilians were killed, more than half of them children, said U.S. Marine Corps Gen. John Allen, the top U.S. commander in Afghanistan. Five Afghan police officers were also killed, along with 11 insurgents.

Asked whether the attack raised concerns about the Afghans' ability to take over their own security, Panetta said that overall their response was good. He repeated U.S. assertions that the violence levels in Afghanistan continue to decline, and that the Taliban has been weakened.

"These kinds of sporadic attacks and assassination attempts are more a reflection of the fact that they are losing their ability to be able to attack our forces on a broader scale," Panetta said.

In other remarks to reporters, the defense chief said that negotiations are progressing well with the Iraqis over a continued U.S. presence in that country after the end of the year.

He said there a still no decisions on the number of U.S. troops that may stay, but the talks are centering on what kind of training and counterterrorism assistance the Iraqis will need,

The Iraqis are grappling with whether they will formally ask the Obama administration to keep a relatively small number of U.S. troops -- between 3,000 and 10,000 -- in Iraq beyond the military's Dec. 31 withdrawal deadline.

U.S. officials favor a plan that would leave between 3,000-5,000 troops there, largely to train Iraqi forces. The Obama administration is also considering staging American troops in Kuwait next year as a backup or rotational training force for Iraq.

U.S. officials are concerned that without additional training, the Iraqi forces will not be able to defend its borders or air space, and may squander the hard-fought security gains.

Officials have talked about the plans on condition of anonymity because nothing is final. About 45,000 U.S. troops are in Iraq.