afghan mosque blast victim
Police stretcher away a victim from the Afghan mosque blast

At least 37 people have died after a suicide attack outside a mosque in the northern town of Mayamana, northern Afghanistan.

A lone bomber blew himself up as people gathered to celebrate the start of the four-day Eid al-Adha holiday.

At least 70 people were wounded in the attack. Top officials including the governor and the police chief, who were at the mosque, were unhurt.

"There was blood and dead bodies everywhere," Khaled, a doctor who was in the mosque at the time of the blast, told AP.

"It was a massacre."

"The suicide bomber detonated explosives when our countrymen were congratulating each other on the Eid holiday," Lal Mohammad Ahmadzai, spokesman for police, said.

"As soon as the police chief got in his vehicle the bomber detonated his explosives. It looks like the target was a large number of security forces," Ahmadzai said.

It was the deadliest suicide attack in months.

In his Eid message to the nation, Afghan president Hamid Karzai appealed to Taliban insurgents "to stop killing other Afghans" and "stop the destruction of our mosques, hospitals and schools".