ISLAMABAD, Pakistan — The first concentrated high-level talks aimed at breaking a five-month diplomatic deadlock between the United States and Pakistan ended in failure on Friday over Pakistani demands for an unconditional apology from the Obama administration for an airstrike. The White House, angered by the recent spectacular Taliban attacks in Afghanistan, refuses to apologize.

The Obama administration’s special envoy to Afghanistan and Pakistan, Marc Grossman, left the Pakistani capital Friday night with no agreement after two days of discussions aimed at patching up the damage caused by the American airstrikes last November that killed 24 Pakistani soldiers on the Afghanistan border.

Both sides insist that they are now ready to make up and restore an uneasy alliance that at its best offers support for American efforts in Afghanistan as well as the battle against some extremist groups operating from Pakistan. The administration had been seriously debating whether to say “I’m sorry” to the Pakistanis’ satisfaction — until April 15, when multiple, simultaneous attacks struck Kabul and other Afghan cities.

“What changed was the 15th of April,” said a senior administration official.

American military and intelligence officials concluded the attacks came at the direction of a group working from a base in North Waziristan in Pakistan’s tribal belt: the Haqqani network, an association of border criminals and smugglers that has mounted lethal attacks on foreign forces in Afghanistan. That confirmed longstanding American mistrust about Pakistani intentions — a poison that infects nearly every other aspect of the strained relationship. That swung the raging debate on whether Mr. Obama or another senior American should go beyond the expression of regret that the administration had already given, and apologize.