President Ashraf Ghani made the announcement in a rare televised address, in which he also asked the Taliban to extend their three-day ceasefire, which is due to end Sunday night. So far the group has not responded.
"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 was due to end Tuesday.
Ghani's comments came on the second day of Eidul Fitr.
It has been marked by incredible scenes of Taliban fighters embracing and even praying with security forces, politicians, and civilians across the war-battered country, in a mass outpouring of emotion over the first nationwide ceasefire since the 2001 US invasion.
Car bomb kills 26 during Eid ceasefire in east Afghanistan
Saturday's attack on a crowd celebrating the ceasefire in Rodat district, in the eastern province of Nangarhar, was the first major incident of violence since the start of Eid.
There was no immediate claim of responsibility for the assault, which provincial governor spokesman Attaullah Khogyani said in a statement killed at least 25 people and wounded 54.
"A suicide bomber detonated among people, security forces and Taliban who were celebrating the ceasefire," Khogyani said earlier.
An Afghan security source said that the Islamic State group -- which was not part of Kabul's ceasefire -- was to blame.
Provincial health director Najibullah Kamawal confirmed the casualty toll.
In scenes that would have been unthinkable only a few days ago, Afghan forces manning checkpoints in the contested district of Bati Kot in Nangarhar offered Eid greetings to Taliban fighters, embracing and posing for photos with the same people they are usually trying to kill.
Hope and despair
The fighters travelled openly by car and motorbike, carrying assault weapons and rocket-propelled grenade launchers and waving Afghan and Taliban flags.
Villagers also flocked around the insurgents, hugging them and happily taking selfies.
"I am here to offer greetings to our brothers in the police and army," Taliban commander Baba said.
"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 their truce for the first three days of Eid, which started on Friday, promising not to attack Afghan security forces for the first time in the nearly 17-year conflict.
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.
Ghani's extension of the ceasefire drew immediate international support.
Nato's Resolute Support mission in Afghanistan and US Forces said in a joint statement they would respect the announcement.
Pictures of Mullah Fazlullah’s grave surface after President Ghani-COAS phone call
The European Union called the truce "historic".
"President Ghani's latest decision to offer an extension of the ceasefire is another courageous step to make way for peace negotiations and we call on the Taliban to reciprocate," said the EU's foreign policy chief Federica Mogherini in a statement.
"The Afghan people deserve a lasting peace."
Extraordinary images posted on social media appearing to show Taliban, security forces and civilians celebrating together served as powerful propaganda for both sides and fanned hopes among ordinary 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 said.
"[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 also came as Ghani confirmed that Pakistani Taliban chief Maulana Fazlullah had been killed in a US drone strike.
US forces targeted Fazlullah in a counterterrorism strike on Thursday in eastern Kunar province, close to the border between Afghanistan and Pakistan, US officials said, without confirming his death.
Ghani said Pakistani leaders had assured him the strike was a "great step toward building trust between the two nations."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ