Civilians slaughtered as violent extremism grows beyond the control of Pakistan's security forces
There was a time when Pakistan was rarely far from the headlines, and for all the wrong reasons. Much of the media coverage of this nuclear-armed Muslim-majority nation of 165 million tended to reduce its complexities down to a one-dimensional image of guns and extremists.
In recent years, however, Pakistan and its travails have largely slipped from the news bulletins, as the wave of uprisings and revolutions across the Middle East and North Africa captured so much attention.
But as the menace of Isil grew amid the war in Syria and the chaos of Iraq, it also planted seeds in Pakistan, with members of homegrown militant groups defecting to the Isil banner. Some have travelled to fight in Iraq and Syria. Others have turned their focus on targets closer to home.
On Thursday, they claimed responsibility for the bombing of one of Pakistan's most famed Sufi shrines in the southern town of Sehwan, killing more than 70 people and wounding scores more in the country's deadliest attack in years.
The Sehwan shrine commemorates one of Sufism's most revered saints, the 13th Century preacher Syed Muhammad Usman Marwandi, better known as Lal Shahbaz Qalandar.
Every year, millions come to honour him at the shrine, which is at least 650 years old. Irish journalist Declan Walsh, who reported on Pakistan for 'The Guardian' newspaper for many years, once memorably described an annual three-day festival held in the mystic's honour there as "Glastonbury, Rio and Lourdes wrapped into one".
Lal Shahbaz Qalandar has inspired dozens of devotional songs that are popular across the subcontinent, including among Hindus in India.
Islam as it has been traditionally practised in Pakistan is heavily influenced by a popular form of Sufism, which melds Islamic mysticism with folk beliefs, some of which overlap with certain Hindu traditions. The popularity of Lal Shahbaz Qalandar, and the reason so many flocked to his shrine, bore testament to this syncretism.
Extremist groups such as Isil consider such practices as against Islam, and they regard anyone who does not follow their interpretation of Sunni Islam - including members of other schools of the faith - as non-Muslims deserving death.
In November, extremists targeted a remote Sufi shrine in south-western Pakistan claiming the lives of at least 50 people. Last summer, a much loved singer of Sufi music, Amjad Sabri, was shot dead in his car in the southern port city of Karachi.
On Thursday, the attackers knew what they were doing. Thursday is usually the most crowded day at the shrine, when pilgrims gather for exuberant devotional singing and a spiritual dance called dhamal.
One woman who was treated for shrapnel wounds to her stomach was defiant: "The terrorists are targeting us just because they hate our shrines… But we will never give up our faith."
Another man denounced those responsible, saying they had transgressed Islam by targeting civilians.
"The terrorists will have to answer for this on the day of judgment," he said.
The attack, which has stunned Pakistan, prompted a security crackdown that has led to the deaths of more than 40 suspected militants so far. Government and military figures have stepped forth to vow further actions against Isil and other extremist groups.
The Sehwan attack came after several others over the past week, including an attack on protesters in the city of Lahore, a bombing in the border town of Quetta that killed two police officers and an explosion in Peshawar, another frontier town in the north.
My last visit to Pakistan was in 2011, when I returned to report on how victims of the 2010 mass floods were faring after their homes and livelihoods had been destroyed the previous year.
I had made frequent visits to Pakistan over the years before that, and on each trip friends there would tell me how worried they were about the extremists' increasing influence in different parts of the country.
One friend who opened a school of classical dance in a major city told me she was careful not to advertise it widely lest it draw the attention of militants who might attack it.
Journalist friends who delved too deeply into the murky nexus between the security forces and certain extremist groups were targeted. For decades, Pakistan's security apparatus worked with radical groups for a number of reasons, including what they call 'strategic depth' in neighbouring Afghanistan.
Many Pakistani critics of this policy say that over the past 15 years, the monster they helped create has grown and mutated beyond their control, often targeting the security forces themselves.
Despite Pakistan's army launching several offensives against militants in recent years, particularly in the regions bordering Afghanistan, where extremist groups such as the Pakistani Taliban embedded themselves, the threat remains high as this week's attacks have shown.
In Pakistan, as in so many other Muslim-majority countries, the battle of force - and ideas - with a minority of extremists continues.