A suicide bomber attacked a Shi'ite Muslim shrine in Kabul on Tuesday killing at least 54 people in unprecedented sectarian violence a day after Afghanistan's Western allies pledged long-term support once their troops leave.

Doctors and police struggled to count the dead from one of the bloodiest attacks in the Afghan capital since the fall of the Taliban government in 2001. The Taliban denied responsibility.

Bodies and blood were scattered across a street after the blast in the heart of old Kabul where a crowd of hundreds had gathered for the festival of Ashura. More than 100 were injured.

It was a potent reminder of Afghanistan's troubles the day after its Western allies gathered at an international conference to pledge long-term support, even after their combat troops leave at the end of 2014.

This is the first time on such an important religious day in Afghanistan that terrorism of that horrible nature is taking place, Afghan President Hamid Karzai told journalists in Germany, where the conference on Afghanistan's future was held.

No one immediately claimed responsibility for the attack. The Taliban condemned the violence as the brutal work of enemies.

Now the number of dead has reached 54 and number of wounded 160, some of them in critical condition, said Sakhi Kargar, a spokesman for the ministry of health.

Afghanistan has a history of tension and violence between Sunnis and the Shi'ite minority. But since the fall of the Taliban the country had been spared the large scale sectarian attacks that have troubled neighbouring Pakistan.

The noon bomb in a riverside shrine appears to set a grim new precedent.

Afghanistan has been at war for 30 years and terrible things have happened, but one of the things that Afghans have been spared generally has been what appears to be this kind of very targeted sectarian attack, said Kate Clark, from the Afghanistan Analysts Network.

We don't know who planted the bomb yet and it is dangerous to jump to conclusions but if it was Taliban, it marks something really serious, and dangerous, and very troubling.

THEY KILLED MY SON

Outside a hospital in central Kabul, mourners cried near a pile of bloodied clothes and shoes.

A woman in a dark headscarf clutching a bloodstained sports shoe said her son, in his early 20s, had died in the attack. They killed my son ... this is his shoe, she wailed.

Shortly after the Kabul blast, a bicycle bomb exploded near the main mosque in northern Mazar-i-Sharif city, killing four and injuring 17 others. The city's streets were filled with people celebrating Ashura, but it was not immediately clear if that attack was targetting Shi'ite worshippers.

A motorbike bomb in southern Kandahar city also injured three civilians, but it had not been placed near any mosques or shrines, and appeared unrelated to the Kabul attacks.

The Shi'ite Muslim festival of Ashura marks the martyrdom of the Prophet Mohammad's grandson Hussein in the battle of Karbala in Iraq in the year 680.

Ashura is the biggest event in the Shi'ite Muslim calendar, when large processions are vulnerable to militant attacks, including suicide bombings. Pakistan has deployed tens of thousands of paramilitary soldiers and police during Ashura.

Blood has spilled between Pakistan's majority Sunni and minority Shi'ite militants for decades.

Sectarian strife has intensified since Sunni militants deepened ties with al Qaeda and Pakistani Taliban insurgents after Pakistan joined the U.S.-led campaign against militancy after the September 11 attacks.

(Additional reporting by Omar Sobhani, Daniel Magnowski and Jan Harvey, writing by Emma Graham-Harrison, Editing by Jonathan Thatcher)