Five police and three children were killed by a bomb planted in a car outside a mosque in Farmay Adha, an area 20km south of the Nangarhar provincial capital of Jalalabad, officials said.

Ajmal Pardis, chief of the main hospital in Jalalabad, said eight bodies had been brought there, including three children.

The provincial police chief, Abdul Basir Solangi, blamed the Taliban for the bombing, which he believed was aimed at the Nangarhar provincial governor, Gul Agha Sherzai, who drove away from the mosque minutes before the explosion.

Sherzai had previously escaped an assassination attempt on May 3 when a bomb planted in a car exploded outside his office.

The blast occurred as thousands of mourners gathered in and around the mosque to mark the death of Younis Khalis, a former mujahedeen commander who died on July 19.

The bomb was planted in a car used by police to drive to the mosque service, Solangi said. 

Witnesses said a vehicle belonging to bodyguards of the provincial governor was damaged in the blast.