WASHINGTON - The fitful U.S. relationship with Pakistan, which U.S. officials say is crucial to the future of Afghanistan and the effort to defeat al-Qaeda, has been improving lately after years of bitter recriminations following the 2011 raid in Pakistan that killed Osama bin Laden.

In the latest sign of cooperation, the United States carried out a series of airstrikes in recent days against some of Pakistan's most wanted militants hiding in a remote border area. On Nov. 24, an American airstrike in eastern Afghanistan narrowly missed Pakistani Taliban leader Mullah Fazlullah, a top target for Pakistan's military, said a U.S. official, who was not authorized to be quoted by name discussing the clandestine operation and spoke on condition of anonymity.

Fazlullah is believed to have ordered the attack on schoolgirl Malala Yousafzai, a children's rights activist who survived and was awarded the 2014 Nobel Peace Prize. Col. Brian Tribus, spokesman for the international coalition in Afghanistan, said the strike in Afghanistan's Nangarhar province killed three armed militants.

The operation was one of a recent series along the Afghanistan-Pakistan border aimed at the group known as the Tehrik-i-Taliban Pakistan, according to U.S. officials who were not authorized to be quoted discussing the strikes. While the State Department considers that group a terrorist organization, it poses a far greater threat to Pakistan than to the United States, having killed thousands of Pakistanis.

The U.S. airstrikes are the most recent indication that the U.S.-Pakistan counterterrorism alliance has recovered from the serious breach it suffered after al-Qaeda leader bin Laden was found hiding in Pakistan in 2011 and the U.S. launched a secret operation to kill him without telling Pakistan.

While neither government fully trusts the other, the relationship has fallen back into its old equilibrium of wary cooperation, according to several American military, diplomatic and intelligence officials who declined to be quoted discussing the sensitive topic.

The counterterrorism alliance is considered crucial to the future of Afghanistan and the effort to destroy al-Qaida.

As it has for years, the U.S. continues to accuse elements of the Pakistani government of secretly supporting terrorists who serve its interests in Afghanistan. But the U.S. also provides Pakistan more than $2 billion a year in military and economic aid, and the countries work closely on some counterterrorism matters.