Image caption In recent years Shias have felt free to to mark their festivals in Afghanistan

The deadly and unprecedented attack on a packed shrine in a historic district of Kabul has put the spotlight on Afghanistan's Shia minority.

Unlike their brethren in Pakistan, Afghanistan's Shias have largely escaped the wrath of the Sunni militant groups that operate in both countries.

There have been low-level tensions between the Shia and Sunni communities and one clash in the largely Sunni area of Herat in 2006 left five dead.

But over the last decade Shias in Afghanistan have been able to celebrate their festivals on a larger scale and with more confidence and openness than ever before.

Ashura, the climax of Muharram, the month of mourning for the martyrdom of the Prophet Muhammad's grandson, is the most important day of the Shia calendar and in Afghanistan it is now marked with a public holiday.

Every Ashura, streets in Shia areas of Kabul are lined with black flags - as a symbol of the community's mourning.

Such signals of their faith were scarcely in evidence until 2001. After the collapse of the Taliban regime and the freedoms that ensued, they extended their mourning ceremonies to non-Shia neighbourhoods, driving long convoys with flags and loudspeakers blaring religious songs.

In fact, there is an Islamic Brotherhood Council of Shia and Sunni clerics who work to maintain harmony between the communities.

Ethnic strife

There has been so little evidence of sectarian violence that many ask how Afghanistan could have evolved so differently to Pakistan, where parts of the country have deep sectarian tensions. The answer lies in Afghanistan's recent history.

There has not been a proper census for more than 40 years, but it is estimated that around 20% of the population are Shia - the rest are Sunni. Most Shias come from the Tajik and Hazara ethnic minorities.

Hazaras, largely to be found in central provinces like Bamiyan, were relentlessly persecuted by the Taliban. Tajiks are spread across the country.

One reason for the absence of openly sectarian conflict in Afghanistan could be the absence of extremist religious groups throughout Afghan history. Both Shias and Sunnis united to wage an insurgency against the Soviet occupation of Afghanistan and Kabul's then communist government in the 1970s and 1980s.

They were fighting for shared causes - Islam and the country.

However, as the war against the Soviets started, Sunni fighters went to Pakistan and Shia fighters went to Iran, where they were radicalised. Because there were then so many factions along linguistic and ethnic lines - and even within religious schools of thoughts - there was no room for a straightforward Sunni-Shia sectarian conflict.

But although sectarian conflict may not have scarred the country, there has been plenty of ethnic strife. After the collapse of the communist regime in 1989, ethnic rivalries between Pashtuns, Uzbeks and Tajiks resulted in a four-year-long civil war that killed tens of thousands.

Sowing division

Regional players such as Iran and Pakistan supported specific ethnic groups and fuelled violence in the country.

But under Hamid Karzai's government, which came into being in 2001 after the downfall of the Taliban, all ethnic and religious groups had freedoms. A number of Afghanistan's private TV channels in Kabul are owned by religious figures and there are at least five Shia-only television channels.

So who would target Shias in Afghanistan now?

Analysts believe the regional players of old still have a stake in Afghanistan's instability. Unity between Shias and Sunnis, and unity between ethnic groups and between political factions leaves no room for Iran or Pakistan to wield influence.

Many analysts here believe that Pakistan in particular has come under increasing international pressure for sheltering militants on its soil, and particularly the leadership of the Afghan Taliban.

This is a charge Pakistan denies but analysts maintain that elements in Pakistan want to open another yet divide - a sectarian one pitting Sunnis in Afghanistan against the Shia who have traditionally shunned the Taliban.

Others believe that the Taliban, who failed to target the recent loya jirga conference in Kabul or to make headlines ahead of the global Bonn conference, are behind this latest attack, in an attempt to further divide Hamid Karzai's political support base.

Either way, a new and brutal precedent has been set and Afghans of all faiths are hoping that it does not open up yet another front in the country's bloody conflict.