Media playback is unsupported on your device Media caption Tears, hugs and selfies as Afghan troops and Taliban mark a truce for Eid

A widely welcomed three-day ceasefire between security forces and the Taliban in Afghanistan appears to be over.

The Taliban said its militants had been ordered to take up arms again on Sunday night - now the Eid festival had ended.

The government says it will continue a unilateral ceasefire for another 10 days, although security forces can defend themselves if attacked.

There were unprecedented scenes of soldiers and Taliban insurgents hugging each other during the ceasefire.

But the ceasefire failed to end violence entirely.

At least 18 people were killed in a suicide attack in the city of Jalalabad, outside the office of the governor of Nangarhar province while officials were meeting Taliban insurgents. Dozens were injured.

No group said it carried out the attack.

On Saturday a suicide bombing in the same province, also on a gathering of Taliban and local officials, left 36 people dead. The Islamic State group said it carried out that attack.

What have the Taliban said?

The militants said there would be no extension to the ceasefire and fighters would be expected to leave government-controlled areas before sunset.

Image copyright EPA Image caption A militant hugs a member of the Afghan police in Kunduz

In a statement, the Taliban said it had called the ceasefire to enable ordinary Afghans to enjoy a peaceful Eid, "not in response to the ceasefire of the Kabul regime".

The group hailed the success of the ceasefire as a sign of its cohesion, and reasserted its determination to seek the "withdrawal of foreign invaders and establishment of an Islamic government".

President Ashraf Ghani's plea on Saturday for the Taliban to prolong its truce has been rejected.

His office said on Sunday that the government's extended truce would still allow Afghan security forces to "defend themselves against any attack".

What happened over the holiday?

In extraordinary scenes during Eid al-Fitr, the end of the holy fasting month of Ramadan on Saturday, militants embraced security force members and took selfies with citizens.

Both sides had declared a three-day truce for the occasion.

Image copyright Reuters Image caption Afghans took selfies with the militants in Kabul

In his announcement on Saturday, President Ghani appealed to the militants to follow the government's lead and enter peace talks.

During the ceasefire, Taliban militants were able to receive medical and humanitarian assistance and Taliban prisoners could see their families, he added.

The government also released some Taliban prisoners, he said.

How did the ceasefire come about?

The Taliban announced the three-day halt to hostilities earlier this month, days after a unilateral ceasefire was ordered by the government.

It is the Taliban's first ceasefire since the government they ran was toppled by the 2001 US-led invasion.

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

In February Mr Ghani offered peace talks "without preconditions" and recognition of the Taliban as a legitimate political group if they respected the rule of law.

Tens of thousands of Afghans have been killed since the US-led invasion drove the Taliban from power in 2001.