No one immediately claimed responsibility for the attack, but both the Taliban and the Islamic State (IS) group are active in eastern Afghanistan.

A wounded man brought to hospital after mortar was fired by insurgents in Haskamena district of Jalalabad east of Kabul, Afghanistan | Photo from AP

An explosion rocked a mosque in eastern Afghanistan as dozens of people gathered to offer Friday players, causing the roof to collapse and killing 62 worshippers, provincial officials said.

Attahullah Khogyani, spokesman for the governor of Nangarhar, said the militant attack wounded 36 others. He said it was not immediately clear if the mosque was attacked by a suicide bomber or some other type of bombing.

"Both men and children are among those killed and wounded in the attack," he said.

No one immediately claimed responsibility for the attack, but both the Taliban and the Islamic State (IS) group are active in eastern Afghanistan, especially Nangarhar province.

Zahir Adil, spokesman for the public health department in Nangarhar Province, said 23 of the wounded were transferred to Jalalabad, the provincial capital, and the rest were being treated in the Haskamena district clinic.

The violence comes a day after a United Nations report said that Afghan civilians are dying in record numbers in the country's increasingly brutal war, noting that more civilians died in July than in any previous one-month period since the UN began keeping statistics.

"Civilian casualties at record-high levels clearly show the need for all parties concerned to pay much more attention to protecting the civilian population, including through a review of conduct during combat operations," said Tadamichi Yamamoto, the UN secretary-general's special representative for Afghanistan.

The report said that pro-government forces caused 2,348 civilian casualties, including 1,149 killed and 1,199 wounded, a 26 per cent increase from the same period in 2018.

The report said 2,563 civilians were killed and 5,676 were wounded in the first nine months of this year. Insurgents were responsible for 62 percent. July to September were the deadliest months so far this year.

In western Herat province, six civilians including four children were killed Thursday when their vehicle was hit by a roadside bomb, said Jelani Farhad, spokesman for the provincial governor. He added that five other civilians were wounded in the attack in the Zawal district.