A suicide bomber blew himself up in a crowd of Afghan Taliban, security forces, and civilians celebrating an unprecedented ceasefire in the war-torn country today, killing at least 20 people, officials said.

The attack came as President Ashraf Ghani announced an extension of the government’s week-long ceasefire with the militant group after both sides agreed to halt hostilities for Eid.

There was no immediate claim of responsibility for the blast that also wounded at least 16 others marking the suspension of fighting in Rodat district of Nangarhar province, but an Afghan security source told AFP that the Islamic State group was to blame.

“A suicide bomber detonated among people, security forces and Taliban who were celebrating the ceasefire,” provincial governor spokesman Attaullah Khogyani told AFP.

He said at least 20 people had been killed and 16 others wounded. Provincial health director Najibullah Kamawal confirmed the death toll but said 25 wounded had been taken to hospital.

Ghani made his announcement in a rare televised address to the nation, in which he also asked the Taliban to extend their three-day ceasefire which is due to end tomorrow.

“I order the security forces to remain on their defensive positions,” Ghani said, adding details of the extension would be released later.

The government’s ceasefire, which was due to end on Tuesday, did not include the IS.

On the first two days of Eid, Taliban fighters, Afghan security forces and civilians hugged and took selfies with each other across the country, in an outpouring of emotion over the ceasefire.

In the contested district of Bati Kot in Nangarhar, Taliban fighters carrying assault weapons and rocket-propelled grenade launchers travelled by car and motorbike, waving Afghan and Taliban flags.

Afghan forces manning checkpoints offered Eid greetings to the fighters, embracing and posing for photos with the same people they are usually trying to kill — a scene that would have been unthinkable only a few days ago.

Villagers also flocked around the insurgents, hugging them and happily taking selfies with the heavily armed fighters as they celebrated the Muslim holiday capping the holy month of Ramadan.

“I am here to offer greetings to our brothers in the police and army,” Taliban commander Baba told AFP.

“We have held the ceasefire well so far. Everyone is tired of war and if our leaders order us to continue the ceasefire, we will hold it forever.”

The Taliban announced a ceasefire for the first three days of Eid, which started yesterday, promising not to attack Afghan security forces for the first time since the 2001 US invasion. They said they would continue attacking US-led NATO troops.

That came after Ghani announced that police and troops would cease operations against the Taliban for eight days, starting last Tuesday – though he warned that operations against other militants, including IS, would continue.

Bati Kot is on the highway connecting the Nangarhar provincial capital of Jalalabad with Torkham, one of the major border crossings into Pakistan, which has long been accused of supporting the Taliban and providing safe haven to its leaders, charges it denies.

Afghans shared photos on social media purportedly showing Taliban fighters around the country gathering with security forces and locals for the holiday.

The bizarre images served as powerful propaganda for both sides and have fanned hopes among war-weary Afghans for the ceasefire to continue.

“Look, they are brothers. If their leaders come, sit and talk just like their soldiers we will have peace tomorrow,” Said Hasibullah posted on Facebook under a photo purportedly showing a Taliban fighter and Afghan soldier having a cup of tea together.

The Taliban had “exploited” the opportunity to show their popularity among ordinary Afghans, a Western diplomat in Kabul told AFP. “(That’s) no bad thing if they are able to see the benefits of talking not fighting,” he said.

The unusual bonhomie between the two sides came as Ghani confirmed that Pakistani Taliban chief Maulana Fazlullah had been killed in a US drone strike.