ACHIN -- Afghan farmer Gulnar Malik had seen her share of hardships as war ravaged her country for decades -- but nothing prepared the mother of five for the arrival of the "Islamic State of Iraq and Syria" (ISIS).
ISIS militants seized her village in Achin District of Nangarhar Province nearly five years ago, unleashing a tide of carnage and slaughter as they sought to expand their self-declared "caliphate" into Afghanistan.
The ISIS "fighters committed a lot of atrocities", Malik, 55, told AFP shortly after the Afghan National Army (ANA) dislodged the terrorists from her home district following weeks of house-to-house fighting, shelling and US air strikes.
"They shot dead one of my children and injured another. My dead boy was trying to run away when they shot him," she recalled, adding that her husband had been detained and tortured over a three-week period.
Malik went home last month having spent years in the comparative safety of a nearby town, after Afghan military officials announced that ISIS's Afghan branch, also known as ISIS in the Khorasan or the ISIS Khorasan branch (ISIS-K), had been completely defeated in Nangarhar.
A major accomplishment
While some local officials are not convinced that the loss is comprehensive, the Nangarhar gains -- if they hold -- would mark a major accomplishment for the Afghan National Defence and Security Forces (ANDSF).
The exact nature of links between ISIS in Afghanistan and the Middle East remains unclear, but ISIS-K first emerged in the region in 2014, largely made up of disaffected fighters from the Taliban and other militant groups in Afghanistan, Pakistan and Central Asia.
ISIS-K fighters coalesced in hilly Achin District in 2015, the first time they controlled territory inside Afghanistan.
For several years they withstood continual air strikes as well as battles with the rival Taliban. They replenished their ranks using a mix of cash and extreme ideology spread inside Kabul's universities.
Heightened joint military operations by Afghan security forces and the NATO-led Resolute Support Mission in Nangarhar drove hundreds of ISIS-K fighters to surrender in recent months.
Finally, on November 17, ISIS-K issued a statement admitting the group's defeat in Nangarhar, adding that its members' guns had no bullets left and they were starving.
"We resisted the American bombing until we escaped Baghouz, and we fought in Nangarhar until we had no ammunition," the militant group said in a statement released on Telegram, referring to ISIS's disastrous last stand in Baghouz, Syria, which ended in defeat by the coalition in March.
One of the surrendered ISIS-K fighters confirmed that the group had had nothing to eat in its last days and that the militants had no option but to surrender.
Homes reduced to rubble
An AFP correspondent recently travelled with an Afghan army unit to a small village in Achin and saw the destruction wrought by ISIS-K.
Built on a forested hillside, many stonework buildings had been reduced to rubble and house walls were pockmarked with bullet holes. There were mangled remains of cars on the roadside.
"We were forced to leave our homes. Now we have returned; all our houses and all of our belongings are destroyed," said local resident Himatullah, 36.
When ISIS-K fighters first arrived, they forced residents to sit on bombs, then detonated them, he recalled. Another day, they beheaded a man accused of infidelity.
Even though the village now is free of ISIS-K, it will take time for residents to feel safe, and many are traumatised.
"Daesh have planted mines everywhere -- in schools, clinics, people's homes," Himatullah said, using another name for ISIS.
Only about 10% of families stayed in the district during ISIS-K's occupation, said Herat Khan, an Achin tribal elder.
The government should "help us in reconstructing schools, houses, clinics and mosques," Khan said, noting that perhaps thousands of houses had been reduced to rubble.
The militants remained in two places in Achin, he said, but ANA Commander Najibullah said ISIS-K had been wiped out.
"The whole area has been cleared of their fighters," he said.
"They will not make a comeback, and the residents of the area, the returnees, should continue their normal lives."
ISIS-K mass surrender
Afghan military operations supported by US-led coalition air strikes set the conditions that have in recent weeks forced more than 1,400 ISIS-K fighters and their families to surrender, according to a US defence official.
Stalled talks between the United States and the Taliban were aimed at striking a deal that would have seen the Pentagon pull thousands of troops from Afghanistan in return for various security guarantees, while leaving a counter-terrorism footprint in the country to go after ISIS-K and other militant groups.
In the years since 2015, ISIS-K relied on tactics like using tunnels to shelter from an aerial onslaught that included the United States deploying its largest non-nuclear weapon, the GBU-43/B Massive Ordnance Air Blast bomb -- dubbed the "Mother Of All Bombs", in 2017.
US military officials no longer detail ISIS-K's force strength, but for years it was estimated between 2,500 and 4,000 fighters.
"We measure [the] Daesh threat in terms of intentions, capabilities and trajectory, not in numbers," the defence official told AFP.