ISLAMABAD -- Military operations and security crackdowns on terrorism have enabled Pakistani Muslims to worship in mosques without fear of attacks, analysts say.
That was not the case just a few years ago.
From 2002 through 2015, 101 mosque attacks occurred in Pakistan, killing 1,330 and injuring 2,711 people, according to the South Asia Terrorism Portal (SATP).
Sectarian attacks on mosques started increasing in 2007 when there were five attacks, followed by nine attacks in 2008, 15 in 2009, 10 in 2010, 9 in 2011 and a peak of 18 attacks in 2012.
After a bloody few years, attacks started to drop again, down to nine in 2013, seven in 2014 and six in 2015.
Last September, one suicide bombing at a mosque in Mohmand Agency, Federally Administered Tribal Areas (FATA), killed at least 36 people and injured 37 others.
So far in 2017, no such incidents have occurred.
Security analysts credit this improvement in mosque security to military operations that specifically target militant and terrorist groups.
"Tehreek-e-Taliban Pakistan (TTP) and its allied groups, especially Lashkar-e-Jhangvi and Lashkar-e-Islam, were involved in most of the terrorist attacks on mosques, including imambargahs in Pakistan," senior security analyst Brig. (ret.) Mehmood Shah of Peshawar, former security secretary for FATA, told Pakistan Forward.
Operation Zarb-e-Azb, launched in June 2014, has been the most successful operation against the TTP and other terrorist groups, eliminating their strength and capability to continue mass attacks against civilians, he said.
New military Operation Radd-ul-Fasaad, launched in February, has further tightened the noose around the militants, improving the overall security situation in Pakistan, Shah said.
This is especially evident during Ramadan, he said, as large groups can be seen in mosques for prayers, at public iftar parties and in markets "as the fear of terrorist attacks has dissipated from the minds of the people".
"Hard-core militants have escaped to Afghanistan, and their computerised national identity cards have been blocked to prevent their re-entry," Shah said. "Tight security is being maintained at the border, which has reduced overall terrorist attacks throughout Pakistan this year."
Nonetheless, desperate militants hiding in Afghanistan are targeting less-guarded Sufi shrines in Pakistan with the support of like-minded militants still in Pakistan, according to Shah.
"The TTP, Lashkar-e-Jhangvi and Lashkar-e-Islam dislike Sufi shrines, and they are attacking these places to create bloodshed and religious disharmony," he said.
"But that trend of terrorism too has been discouraged by improvement in security measures," Shah said.
Security analyst Col. (ret.) Mukhtar Ahmed Butt reiterated that assessment.
"After the suicide attack at the shrine of Lal Shahbaz Qalandar in Sehwan Sharif, Sindh Province, in which more than 70 people were killed, security personnel found out that the handlers of the attack were based in Afghanistan," he told Pakistan Forward.
After that bombing, the government took extra security measures to protect sensitive places from terrorism, he said.
But Pakistan's fortune may be Afghanistan's misfortune, he said, as terrorist groups such as the "Islamic State of Iraq and Syria" (ISIS) and other groups with extremist ideology have ramped up attacks in Kabul and other parts of the country.
"In 2017, we have seen the worst attacks by ISIS in Afghanistan, which killed and wounded a large number of civilians and security personnel," Butt said.
In Pakistan, law enforcement personnel have become the main victims of militants, who target them with roadside bombs and attacks on isolated police or military vehicles, he said.
"What is needed at this stage is to control sectarian killings and to stop cross-border terrorism from Afghanistan, while both countries should hold talks to revive permanent peace," he said.
Militant groups are attempting to divide Pakistanis, but members of all faiths remain united, said Mubasher Mir, security analyst and resident editor of the Daily Pakistan in Karachi.
"Militants are targeting the shrines of Sufi saints, which are symbols of religious harmony, tolerance and peace in Pakistan," he told Pakistan Forward.
"Muslims belonging to different sects visit the shrines, and even non-Muslims in Pakistan visit the shrines to promote harmony and tolerance," he said.
What is the biggest challenge to Pakistan in 2018?