The Afghan Taliban is angry at its members for posing for selfies with soldiers and government officials during a three-day ceasefire that saw the militants enter towns and cities to celebrate the end of Ramadan, according to a senior official of the insurgent group.

The unprecedented ceasefire between the Taliban and the Afghan government was held to coincide with the Muslim holiday of Eid Al Fitr, with the warring sides sharing hugs and photo opportunities to mark the occasion.

People take selfies with a Taliban in Kabul, Afghanistan June 16, 2018. REUTERS/Mohammad Ismail

Taliban on motorbikes shake hands with people in Kabul, Afghanistan June 16, 2018. REUTERS/Mohammad Ismail

But senior Taliban officials were reportedly less than impressed with the pictures.

"Last night, an emergency meeting was called and all the commanders were informed and directed to take strict disciplinary action against all those Taliban members who visited citizens and took pictures with the Afghan authorities," a senior Taliban official, speaking on condition of anonymity, told Reuters on Monday.

Some insurgents seen taking selfies with Afghan government forces and officials had been warned, the official added.

The Eid ceasefire marked the first such truce since the US-led invasion of Afghanistan in 2001.

Since its ouster by US-led forces, the Taliban has been fighting to expel foreign troops, defeat the US-backed government and restore sharia, or Islamic law.

The Taliban ceasefire ended on Sunday, while the government extended its unilateral ceasefire with the group, which had been due to end on Wednesday, by 10 days.

“If the ceasefire continues, this will allow everyone to share their resources in order to help the people who are affected, so our desire for peace and prosperity will be truly realized,” Afghan President Ashraf Ghan said last week.