Afghan President Hamid Karzai has cut short an official visit to China following reports of civilian deaths in a NATO air strike in eastern Afghanistan.
Karzai said 18 civilians were killed in the strike in Logar Province on June 6, adding that civilian casualties in such operations are "unacceptable."
Karzai's statement came as U.S. Defense Secretary Leon Panetta arrived in Afghanistan for a previously unannounced visit.
Panetta said it will be difficult to achieve stability in Afghanistan so long as militants continue to receive shelter in Pakistan's tribal areas.
"We've made very clear that it is difficult to achieve a secure Afghanistan as long as there is a safe haven for terrorists in Pakistan, from which they can conduct attacks on our forces," Panetta said.
He said the United States is "reaching the limits of its patience" with Pakistan's failure to take decisive action against militants.
"We are reaching the limits of our patience here, and for that reason it is extremely important that Pakistan take action to prevent this kind of safe haven from taking place and from allowing terrorists to use their country as a safety net in order to conduct their attacks on our forces," Panetta said.
WATCH: U.S. Defense Secretary Leon Panetta has urged Pakistan to do more to root out the Al-Qaeda-linked Haqqani network from its territory, saying that U.S. officials are "reaching the limits of our patience."
The June 6 violence in Afghanistan included at least 22 people killed in a series of suicide bombings in Kandahar Province.
Panetta, speaking at a news conference in Kabul, said Pakistan has to take action to root out the Haqqani militant group blamed for some of the deadliest crossborder attacks during the 10-year war.
"We have made that clear, time and time again, we will continue to make that clear that it is an intolerable situation to have those attacking our people, our forces , have the convenience of being able to return to a safe haven in Pakistan," Panetta said.
U.S. officials have long pushed Pakistan to do more to combat militants using its soil to organize and launch attacks on international troops in Afghanistan.
Already tense U.S.-Pakistani relations have been further strained by continued NATO drone strikes targeting militants in northwest Pakistan, as well as Pakistan's decision to close NATO supply routes to Afghanistan through Pakistani territory after a NATO air strike killed 24 Pakistani six months ago.
Panetta was meeting U.S. military commanders to get an assessment of the situation in Afghanistan as the United States prepares to withdraw some 23,000 troops from Afghanistan by the end of September.
Panetta acknowledged earlier on June 7 that there has been an upsurge in insurgent violence recently, and that some recent attacks have been "more organized" than earlier ones.
With reporting by Reuters, AP, and dpa