Pakistani army chief Raheel Sharif addresses internally displaced Pakistani civilians fleeing a military operation against Taliban militants in the North Waziristan tribal agency during a ceremony to mark the country’s Defence Day in Bannu, near the North Waziristan border, on Sept. 6. (Karim Ullah/AFP/Getty Images)

— The last time a Pakistani army chief visited Washington, he got an earful from U.S. leaders worried that he was not a reliable partner in efforts to combat militant groups responsible for devastating attacks in Afghanistan.

Four years later, Pakistan’s newest military chief, Gen. Raheel Sharif, is scheduled to arrive in Washington this weekend on his first official U.S. visit. And this time, the most powerful man in Pakistan is expected to be greeted with far less skepticism.

Since becoming army chief a year ago, Sharif has overseen a broad military campaign against Islamist extremists in northwestern Pakistan. Although it could take months or years to fully assess its effectiveness, U.S. officials say the operation has boosted their confidence in Pakistan’s commitment to combating terrorist groups operating within its borders.

Last week, Lt. Gen. Joseph Anderson, a senior commander of U.S. and NATO forces in Afghanistan, told reporters that the Haqqani network — a Pakistan-based Afghan insurgent group — is now “fractured.”

“That’s based pretty much on the Pakistan ops in North Waziristan this entire summer-fall,” Anderson said in a video conference from the Afghan capital. “That has very much disrupted their efforts here and has caused them to be less effective in terms of their ability to pull off an attack here in Kabul.”

Although other U.S. officials are more guarded in their assessments, Anderson’s remarks are helping to set the tone for Sharif’s visit. The week-long trip also coincides with growing optimism that relations among the United States, Pakistan and Afghanistan are improving now that Hamid Karzai is no longer the Afghan president.

“Both sides are aware of this historical moment and are taking steps to seize this moment,” U.S. Ambassador Richard G. Olson said in a speech Wednesday in Islamabad.

On Friday, Afghanistan’s new president, Ashraf Ghani, traveled to Islamabad and met with Raheel Sharif. Ghani also plans talks with Pakistani Prime Minister Nawaz Sharif, who is not related to the general, over the weekend. The Pakistani leader plans to take Ghani to a cricket match.

For many analysts, the two visits signal that the space for meaningful engagement on counterterrorism issues is expanding with a new power-sharing government in place in Afghanistan.

Karzai, who had been Afghanistan’s only leader since shortly after U.S.-backed forces ousted the Taliban from power in 2001, was deeply skeptical of Pakistan and widely considered it the root of many of Afghanistan’s woes. He also repeatedly clashed with the Obama administration, setting limits on U.S. military operations and refusing to allow a residual American troop presence after the NATO mission in Afghanistan ends this year.

But Ghani, within days of taking office, signed an agreement that will keep about 9,800 U.S. troops in Afghanistan next year.

Last month, in a sign of thawing relations between Pakistan and Afghanistan, the two nations agreed to jointly import power from Kyrgyzstan and Tajikistan, Olson noted. Ghani also recently announced that he is reevaluating Karzai’s efforts to buy weapons from India for the Afghan army. The new president’s move was widely interpreted as an olive branch to Pakistan, which has fought three major wars with India since 1947.

Salman Zaidi, a military and political expert at the Islamabad-based Jinnah Institute, said there appears to be a genuine effort to put past tensions “back in the box.”

“There is still a lot of debris lying around [in the relationships] from the last 10 years, both in terms of Pakistan-U.S. ties and Pakistan-Afghanistan, but the attempt is now there,” Zaidi said. “Karzai was a mercurial personality, and everybody found it difficult to deal with him.”

For years, Pakistani military and intelligence officials have been accused of secretly providing support to some militant groups, including the Haqqani network, thwarting U.S. efforts to contain the flow of fighters and weapons from Pakistan into Afghanistan.

In widely reported remarks in 2011, Adm. Mike Mullen, then chairman of the Joint Chiefs of Staff, told the Senate Foreign Relations Committee that the Haqqanis were operating “with impunity” in Pakistan and were relying on state support.

Although Gen. Ashfaq Kayani, Pakistan’s army chief at the time, oversaw two military operations in the Swat Valley and another in South Waziristan, he resisted calls to invade North Waziristan, which had become a haven not only for the Pakistani Taliban but also for al-Qaeda and the Haqqani network.

But in June, Raheel Sharif ordered the military into North Waziristan. Since then, Pakistani officials say, more than 1,200 terrorists have been killed or captured. Seventy Pakistani soldiers also have been killed.

Last month, in a move that surprised many analysts, the army chief expanded the operation to the Khyber Agency, also in Pakistan’s unruly tribal areas.

“This time, the army is not letting up,” said Javed Ashraf Qazi, a retired general and former head of Pakistan’s spy agency. “The air force, the gunship helicopters hit them wherever they are, and the army is slowly and gradually moving up into the mountains to their last refuges.”

Still, Pakistan’s military has not released the names of any high-value terrorists killed in the operation. And Anderson’s comments notwithstanding, many U.S. officials remain unconvinced that Pakistan’s military is poised to deliver a lasting blow to the Haqqani network, which has carried out several attacks on coalition forces in Afghanistan.

A senior U.S. official, who spoke on the condition of anonymity because of the sensitivity of the matter, said the military offensive has “disrupted” but “not damaged” the Haqqanis. Still, the official said ties between the United States and Pakistan have greatly improved since the 2011 U.S. operation that killed Osama bin Laden in Pakistan.

“Pakistan now has substantial control over their whole territory — they have expended a lot on this operation, and we have to give them credit,” the official said. “We also have to hold them to their repeated commitment not to allow [the Haqqani network] to operate from Pakistan.”

Here in Islamabad, analysts expect Raheel Sharif to quickly forge a productive relationship with his U.S. counterparts.

Imtiaz Gul, executive director of the Islamabad-based Center for Research and Security Studies, said Sharif is known to be “assertive, aggressive” and outspoken. Kayani, who served as the military chief from late 2007 until last November, was known to be reserved and often said little during meetings.

“I think [Pentagon leaders] will feel quite at home with him, because his style is more the American style,” Qazi said of Sharif. “But actions speak louder than words, and, so far, he is giving them action.”