

KABUL, Afghanistan -- Defense Secretary Leon E. Panetta, paying a brief visit to the Afghan capital, said Thursday the United States was reaching “the limit of our patience” with neighboring Pakistan’s sheltering of insurgents who cross the border to attack Western troops and Afghans alike.

Coinciding with Panetta’s stopover, Afghan President Hamid Karzai cut short a trip to China to signal anger and frustration over the deaths of 18 civilians in what Afghan officials said was an errant U.S. airstrike a day earlier. Panetta had already left the country by the time Karzai returned.

Panetta’s visit, his fourth as Defense secretary, came as the American military presence in Afghanistan is poised to diminish considerably. By the end of the summer, another 23,000 American troops are to head home, reducing the U.S. forces to about 68,000 personnel -- a schedule that Panetta said he expected to hold.

The drumbeat of criticism of Pakistan echoed statements earlier in Panetta’s nine-day Asian tour.

Relations between Islamabad and Washington have been marked by rancor over an intensive campaign of U.S. drone strikes and the continuing deadlock over a deal that would allow NATO supply convoys to transit Pakistani territory. Pakistan stopped the flow of supplies after an errant U.S. airstrike in November killed 24 Pakistani soldiers near the country's border with Afghanistan.