Afghan President Hamid Karzai on Wednesday cancelled a planned visit to Britain to return straight home after rare sectarian attacks the previous day which killed 59 people and put the spotlight back on Afghanistan's security problems.

Tuesday's bombings, the largest of which targeted a Shi'ite Muslim shrine in the capital Kabul, wiped out any residual optimism from an international conference about the future of Afghanistan, held on Monday in Germany, and refocused attention on the fragile Afghan security situation.

Afghans have previously been spared the large-scale sectarian attacks that regularly trouble Iraq and neighbouring Pakistan, but now face the grim prospect of a new type of bloodshed being added to the dangers of daily life.

The reason for President Karzai's trip cancellation to Britain is the terrorist attacks on Ashura in Kabul, Mazar-i-Sharif and Kandahar which killed and wounded many participants, Karzai's office said in a statement.

The NATO-led International Security Assistance Force (ISAF), responsible for security across much of the country, says it is winning the war against the Taliban.

But if Tuesday's bombing sets a precedent for violence between the Sunni Muslim majority and the Shi'ite minority, it would severely stretch army and police resources.

At a funeral ceremony on Wednesday for victims of the attack, hundreds of Shi'ite Muslims bore aloft the bodies of the dead, chanting that because they had been killed at a Muslim ceremony, they had died in the name of the Prophet Mohammad.

We were sacrificed for you, they shouted.

Some Shi'ite Muslims said immediately after the Kabul blast that police had not done enough to protect them. Hundreds of worshippers had gathered to mark the festival of Ashura at a shrine in central Kabul when a suicide bomber struck.

Among those killed in Tuesday's attacks was a U.S. citizen the American embassy in Kabul said in a statement. It gave no further details.

At the German conference, the Afghan government's Western backers, who have spent billions of dollars on the country since the U.S.-led overthrow of the Taliban government in 2001, pledged to support the country beyond the end-2014 deadline for the withdrawal of foreign combat troops.

Afghanistan has said that it will not be able to afford the army and police force it needs after 2014 without international help, and Tuesday's attack is likely to reinforce fears about the ability of Afghan forces to cope with violence after ISAF has fully handed over security.

(Editing by Daniel Magnowski and Jonathan Thatcher)