A car bomb has killed at least 26 people in Afghanistan as militants gathered across the country to celebrate the ceasefire, according to officials.

The attack in the town of Ghazi Aminullah Khan near Jalalabad in the eastern province of Nangarhar on Saturday also left dozens wounded.

Most of the casualties are believed to be Taliban, said Nangarhar police chief Ghulam Sanayee Stanikzai.

Isis claimed responsibility for the attack on what it called "a gathering of Afghan forces", according to a report from the group's Amaq news agency.

"The area where the blast happened is close to our front line," said Taliban spokesman Zabihullah Mujahid. "Some of our members went there to celebrate Eid. Our members suffered casualties."

The Taliban ceasefire began on Friday to mark the Islamic holiday of Eid al-Fitr and overlapped with an Afghan government ceasefire which is due to last until Wednesday. Isis did not sign up to the ceasefire.

News of the bombing came as President Ashraf Ghani gave an address to the nation that he would extend the ceasefire with the Taliban.

He did not give a time-frame but asked the Taliban to extend their own ceasefire as he announced that 46 Taliban prisoners had been freed.

On Saturday morning dozens of unarmed Taliban militants entered Kabul and other cities to pose for selfies with local residents.

Videos posted online captured Afghan soldiers and Taliban fighters hugging one another and exchanging Eid greetings in the provinces of Logar, Zabul and Maidan Wardak.

"It was the most peaceful Eid. For the first time we felt safe. It is hard to describe the joy," said student Qais Liwal.

War artists in Afghanistan Show all 6 1 /6 War artists in Afghanistan War artists in Afghanistan Work by Matthew Cook Matthew Cook War artists in Afghanistan War artists in Afghanistan Work by Jules George Jules George War artists in Afghanistan Embedded: Jules George War artists in Afghanistan Work by Jules George Jules George War artists in Afghanistan Trooping the colours: Jules George was inspired by his father and grandfather to witness and document war, if not to wage it Jules George

Civilians in parts of the eastern city of Jalalabad were seen offering dry fruit, traditional sweets and ice cream to Taliban fighters.

In Kunduz, which has witnessed a series of bloody clashes, Taliban and Afghan police met up as if they were old friends.

"I could not believe my eyes," said resident Mohammad Amir. "I saw Taliban and police standing side by side and taking selfies."

Doctor Abdul Majhid said nearly 2,000 Taliban were seen celebrating with family and friends as well as Afghan security forces.

"We are feeling that these days are golden days for us, it is so peaceful," he said.

In southern Kandahar, Haji Gulalai told reporters: "I'm so happy for the cease fire in Afghanistan, and I am hoping peace forever."