A Pakistani army soldier stand guard as cricket fans arrive at Gaddafi Stadium for an international match between Pakistan and Zimbabwe on May 31, 2015 in Lahore, Pakistan. (K.M. Chaudary/AP)

One year after Pakistan’s army launched its offensive in the country’s northwestern tribal belt, Pakistani deaths from terrorist attacks are at an eight-year low, but U.S. officials say that more work is needed before the country can reverse its reputation as a top incubator of Islamist militancy.

After a decade of bloodshed that killed more than 50,000 civilians and soldiers, Pakistan’s military grew fed up last June when a homegrown militant group, the Pakistani Taliban, attacked Karachi’s international airport. In response, Pakistan’s air force and army began pounding North Waziristan, destroying two cities there while also ordering the evacuation of more than a million residents.

Since then, the number of terrorist attacks in Pakistan has plunged as the Pakistani Taliban and al-Qaeda appear to have fewer havens.

During the first five months of this year, 500 civilians died in terrorist attacks in Pakistan, compared with 787 during the same period last year and 1,536 in 2013, according to the South Asia Terrorism Portal, which monitors violence in the region. The last time that the start of a year was so peaceful was in 2007 — before the Pakistani Taliban emerged as a serious threat to domestic security.

But analysts caution that Pakistan still remains vulnerable to major terrorist attacks similar to the Taliban assault on the school in Peshawar in December that killed about 150 teachers and students. And the gains the Pakistani army has made are clouded by the perception that it simply shifted much of the problem across the border into Afghanistan — but the militants who are now there easily could migrate back into Pakistan over time.

“Some people were displaced, but we should not be misled,” said Ijaz Khan Khattak, former chairman of the International Relations Department at the University of Peshawar. “This is a long war, and in long wars, lulls do happen. This is just a small lull.”

Although U.S. officials credit Pakistan for making serious gains against the Pakistani Taliban and al-Qaeda, there is less optimism about its efforts in combating groups such as the Haqqani network and Afghan Taliban, which focus attacks on Afghanistan.

And with tensions between Pakistan and neighboring India rising once again, few analysts expect Pakistani leaders to follow through on their promise to also crack down on militant groups that have a decades-long history of carrying out attacks in India. There are also concerns that Pakistan still isn’t taking seriously the threat posed by the Islamic State, which is trying to gain a foothold in the region.

“We think the operation has absolutely eliminated the safe havens in Miranshah and Mir Ali [in North Waziristan], which were real fundamental concerns for us, the Afghans and also Pakistanis in recent years,” said one U.S. official, who asked not to be identified to speak freely about the matter. “The focus for us as we move forward: First, some of these militants have dispersed around Pakistan and continue to plan attacks against not only Pakistanis, but also against Afghans, Americans and others inside Afghanistan.”

The official added, “And it’s is going to take a sustained effort to make sure these groups don’t reconstitute in the cleared areas.”

For many Pakistanis, though, there is little doubt that the year-long operation is starting to show signs of real success.

In Peshawar, which had been a center of violence, ambulance drivers say they are finally starting to relax because they are no longer called as often to respond to attacks. In the capital of Islamabad, which has not experienced a major terrorist attack in more than a year, some Westerners are again visiting shopping malls and cafes. Slowly, foreign leaders, business executives and sports teams are trickling back into Pakistan for official visits.

“The politicians from this province were always facing a serious threat, but now those political leaders are roaming freely without any fear,” said Shah Farman, a lawmaker in Pakistan’s northwestern Khyber Pakhtunkhwa province, where police report a 50 percent drop in attacks.

Maj. Gen. Asim Bajwa, chief spokesman for the Pakistani military, said that so far, 2,763 terrorists have been killed in tribal areas during the first year of the operation, while another 218 have been killed in Pakistani cities. Thousands of others have been detained, Bajwa said.

In December, Pakistani forces killed al-Qaeda’s global operations chief, Adnan el Shukrijumah, who had been on the FBI’s most-wanted list. Earlier this spring, Pakistan also arrested another top al-Qaeda operative, Muhanad Mahmoud al Farekh and handed him over to U.S. authorities.

Ashraf Ali, former president of the FATA Research Center, said many high-value targets simply fled North Waziristan as the Pakistani military moved in. As a result, security has steadily worsened in Afghanistan, which is experiencing record numbers of troop and civilian casualties this year.

Cross-border movement has been one of the enduring struggles of the 13-year-old war in Afghanistan. When the operation began last June, Pakistani leaders say they asked former Afghan president Hamid Karzai to deploy more forces to that side of the border.

Karzai, who is deeply skeptical of Pakistan’s motives, refused, they say.

Since Afghan President Ashraf Ghani succeeded Karzai in September, relations between Afghanistan and Pakistan have improved dramatically, according to U.S. officials and government leaders in both countries.

But Ghani is staking his political reputation on Pakistan’s ability to nudge the Afghan Taliban, which has historical ties to Pakistan’s military and intelligence outfit, into peace talks. Pakistan so far has been unable to accomplish that.

Both Afghan and U.S. officials remain frustrated that Pakistan’s operation has not seriously disrupted the Haqqani network, which they blame for some of bloodiest attacks in Afghanistan. Many Haqqani network commanders are thought to have resettled in Peshawar, Karachi or in South Waziristan, according to local tribal officials.

Last month, the group carried out an assault on a guest house in Kabul, which killed 10 foreigners including one American. The attack was planned from Peshawar, according to Afghanistan’s National Directorate of Security (NDS).

Ali Mohammad, a Kabul-based political and security researcher, said such attacks demonstrate that elements of Pakistan’s military and intelligence hierarchy still can’t be trusted to follow through on pledges from Pakistani leaders that they are targeting all terrorist groups.

“We are seeing very strong statements from the Pakistan military leadership, but the big question is: What is going on in the local army units, in the local ISI offices, where they often have local agreements with these groups?” said Mohammad, referring to Pakistan’s Inter-Services Intelligence agency.

But Saad Muhammad, Pakistan’s defense attache to Kabul from 2003 to 2006, predicted peace talks between the Afghan Taliban and Ghani’s government would begin soon, perhaps immediately after the Islamic holy month of Ramadan ends in mid-July.

“Ashraf Ghani has put all of his eggs in Pakistan’s basket, so if something doesn’t happen, he becomes a weakened man, and that would be disastrous for Pakistan,” said Muhammad, who maintains informal contact with some elements of the Afghan Taliban’s leadership. “Pakistan will not break contact with the [Afghan Taliban], but it will begin pressure after pressure. You can put some people under arrest. You can harass them. You can break up their meetings.”

Still, other analysts and Pakistani leaders note that the weakening of groups such as the Afghan and Pakistani Taliban is opening up other security concerns, including the potential rise of the Islamic State in the region.

As the groups have lost the ability to route money and resources through North Waziristan, and perhaps eventually Quetta, where much of the Afghan Taliban leadership resides, analysts say branches of the militant groups increasingly will turn to the Islamic State for support. Of particular concern is that the conflict may then become even more sectarian in nature, similar to the Islamic State’s offensive in Iraq.

Even if the Islamic State emerges as the top threat to Pakistan, though, that in itself would be a sign that the military operation has worked, said Muhammad Amir Rana, an Islamabad-based security analyst.

“We are now no more a special case,” Rana said. “Now, we just have the same kind of problems that other Muslim countries are facing.”

Haq Nawaz Khan in Peshawar contributed to this report.