ISLAMABAD, Pakistan  In an unusually strong statement criticizing the United States for sending commandos into Pakistan to fight the Taliban and Al Qaeda, the chief of the Pakistani Army said Wednesday that his forces would not tolerate such incursions and would defend the country’s sovereignty “at all costs.”

“No external force is allowed to conduct operations inside Pakistan,” the military chief, Gen. Ashfaq Parvez Kayani, said in what amounted to a direct rebuff to the United States by the Pakistanis, who are regarded by the Bush administration as an ally in the campaign against terrorism.

When General Kayani took over as chief of the army in November, American officials spoke highly of him and were counting on him to be their ally in much the same way, perhaps even to a greater degree, as President Pervez Musharraf had been. Mr. Musharraf was president and army chief for almost all of his nearly nine-year rule.

General Kayani’s statement on Wednesday seemed to call into question the extent of his cooperation and that of Pakistan’s army.