KABUL, Afghanistan — A car bomb tore through an unprecedented cease-fire between Afghan forces and Taliban militants on Saturday, officials said, killing at least 20 in the eastern province of Nangarhar.

The blast struck a gathering of Taliban and Afghan security officials held amid a cease-fire to mark the end of the Ramadan fasting season. It's believed to have killed civilians, Afghan troops and members of the Taliban, according to the spokesman for the governor of the city of Jalalabad.

No one immediately claimed responsibility for the attack, but ISIS has a strong presence in the region. The cease-fire does not include al Qaeda or the Islamic State group.

"The incident has nothing to do with the Taliban," spokesman Zabihullah Mujahid told Reuters. "The area where the blast happened is close to our front line. Some of our members went there to celebrate Eid. Our members suffered casualties."

Men carry an injured man in a hospital after a car bomb, Jalalabad city, Afghanistan on Saturday. Parwiz / Reuters

Islamic State’s affiliated media arm, Amaq, released a statement about the attack, but there was no specific claim of responsibility by Islamic State, also known as ISIS, according to security consulting firm and NBC News partner Flashpoint Intelligence.

As news of the attack spread, Afghan President Ashraf Ghani announced he would extend the cease-fire with the Taliban, but did not give a time frame for the extension. In a video message Ghani urged the Taliban to extend their cease-fire and said he would wait for their response.

He added that 46 Taliban prisoners had been released and the Taliban would now be able to receive assistance and benefits like other Afghan civilians. The president did not immediately mention the bomb-blast.

U.S. Secretary of Mike Pompeo said the U.S. welcomes the proposed extension of the cease-fire. The United Nations secretary-general "urges the Taliban to heed the call for peace from the Afghan people and also extend the ceasefire," a spokesperson said in a statement.

Dozens of unarmed Taliban militants had earlier entered the Afghan capital to celebrate the cease-fire, as elsewhere soldiers and militants, in remarkable scenes, exchanged hugs and selfies.

The Taliban, wearing traditional headgear and many with sunglasses, entered Kabul through gates in the south and southeast. Traffic jams formed where people stopped to take pictures of the fighters with their flags. The Taliban urged people to come forward and pose for the camera.

The militants announced a surprise three-day cease-fire over the Eid-al-Fitr holiday, which began on Friday, except against foreign forces. It overlaps with an Afghan government cease-fire which was due to end on Wednesday before the Afghan president extended the truce.

Many people across the country have urged the government and the Taliban to extend their cease-fires, which follow months of deteriorating security, especially in the capital Kabul.

Alleged Taliban members meet and greet Afghan people on Saturday. STR / EPA

A Taliban commander told NBC News that the group is under pressure from Pakistan and other nations to extend the cease-fire, and for it to include U.S.-forces and their allies. The commander, who spoke on the condition of anonymity because he was not authorized to speak, said they were unlikely to extend the truce.

The Taliban are fighting U.S.-led NATO forces, combined under the Resolute Support mission, and the U.S.-backed government to restore sharia, or Islamic law, after their ouster by U.S.-led forces in 2001.

Ahmed Mengli reported from Kabul, Saphora Smith reported from London.