An Afghan official says four civilians have been killed and around 40 wounded by a bomb blast inside a mosque in the restive eastern province of Nangarhar, which borders Pakistan.

Attaullah Khogyani, spokesman for the provincial Nangarhar governor, says the blast occurred during Friday prayers in the Rodat district, near the provincial capital of Jalalabad.

He says the mosque was full as Muslims are observing the holy month of Ramadan. Khogyani says the death toll is expected to rise as many of the wounded are in a critical condition.

Insurgent and criminal activity is high in Nangarhar, where the Taliban earlier this year fought fierce battles with gunmen claiming loyalty to the Islamic State group.

Insurgents from other groups based in Pakistan are also known to operate in the province.