"Nineteen were members of the security forces, including police, army and intelligence agents. Seventeen were civilians and five children are also among the dead."

Mr Barez, like many other provincial officials, was at the scene at the time of the bombing and described the horror of the blast in the midst of a religious celebration.

"We had just finished Eid al-Adha prayers and we were congratulating and hugging each other," he said.

"Suddenly a big explosion took place and the area was full of dust and smoke and body parts of police and civilians were all over the place. It was a very powerful explosion."

One eyewitness, Sayed Moqeed, described the bomber as appearing to be in his early teens.

"Suddenly I heard a very big explosion," he said.

"Everywhere were pieces of bodies, hands and limbs. The suicide attacker was in police uniform, he looked to be around 14 or 15 years old."

Afghan president Hamid Karzai strongly condemned the attack, calling the perpetrators "the enemies of Islam and humanity".

"Those who take the happiness of Muslims during Eid days cannot be called human and Muslim," he said.

The United States embassy said the "attack against innocent worshippers further demonstrates the insurgency's lack of respect for religion, faith and its disregard for the safety and security of the Afghan people".

The commander of NATO'S International Security Assistance Force, General John Allen, condemned "this heinous act" and offered ISAF's resources to "help however we can".

The four-day Eid holiday is a celebration in which Muslims slaughter animals for feasts and distribute a portion of the meat among the poor.

The first day usually draws large crowds to mosques around the Islamic world.

At this stage no group has claimed responsibility, but suicide bombings are a favoured tactic of the Taliban.

Northern Afghanistan is usually safer than other parts of the country, but recently insurgents have been increasing their activities there.

It is the worst death toll in a single attack in Afghanistan since 80 died on December 6 last year in a suicide blast at a shrine in Kabul on the Shiite holy day of Ashura.