Differences between Pakistan’s Sunni majority and Shia minority go back to the Islamic schism following the prophet’s death.
But in the past two decades those differences have been manifest in repeated violence wrought by Sunni and Shia extremists.
The violence, which worsened after 11 September and the expulsion of the Taleban from Afghanistan, led President Pervez Musharraf to ban a number of militant groups.
However, the BBC’s Zaffar Abbas in Islamabad says recent attacks show the extremists who were forced into hiding by the clampdown are now resurfacing.
In early Islamic history the Shia were a political faction (“party of Ali”) that supported the power of Ali, son-in-law of the Prophet Mohammed and the fourth caliph (temporal and spiritual ruler) of the Muslim community.
Ali was murdered in 661AD and his chief opponent, Muawiya, became caliph. It was Ali’s death that led to the great schism between Sunnis and Shias.
Caliph Muawiya was later succeeded by his son Yazid, but Ali’s son Hussein refused to accept his legitimacy and fighting between the two resulted.
Hussein and his followers were massacred in battle near Karbala in AD680.
Both Ali and Hussein’s death gave rise to the Shia cult of martyrdom and sense of betrayal.
Shia has always been the rigid faith of the poor and oppressed waiting for deliverance. It is seen as a messianic faith which awaits the coming of the “hidden Imam”, Allah’s messenger who will reverse their fortunes and herald the reign of divine justice.
Most sectarian violence in Pakistan takes place in the province of Punjab and the country’s commercial capital, Karachi, in Sindh province.
There have also been outbreaks in Quetta, capital of Balochistan province.
It is estimated that around 4,000 people have been killed in Shia-Sunni violence since the 1980s across Pakistan.
President Musharraf is not the only Pakistani leader to have been beset with such problems, which most analysts agree began in 1979 when General Zia ul-Haq began Islamicising Pakistani politics to legitimise his military rule.
As a result, hardline religious groups were strengthened.
This coincided with a period when parts of Pakistan came to be awash with weaponry as a result of the Soviet invasion of Afghanistan in late 1979.
US arms and Saudi funds allowed General Zia to mount a proxy war in Afghanistan with mujahideen, or holy warriors.
Drawn from Pakistani as well as Afghan and Arab youths mostly educated at religious schools, the mujahideen and their patrons were to become influential actors in Pakistan.
Because Sunnis form a large majority in Pakistan, most of the mujahideen were Sunni too.
Radical Sunni Islamists were able to establish armed groups like the Sipah-e-Sahaba.
Shia fighters too joined the jihad, or holy war, against the Soviets in Afghanistan, although their bands were smaller.
They received help from Iran where the Islamic revolution earlier in 1979 had boosted Shia confidence.
The growth of Shia militancy led to the establishment of groups such as Tehrik-e-Jafria.
Once the Soviets left Afghanistan, Pakistani militants returned home and began looking for a new jihad.
Many were encouraged to take their combat skills to Indian-administered Kashmir.
Others stayed at home to begin a campaign against fellow-Muslims they considered heretics or against Westerners and Christians.
After dozens were killed in sectarian attacks, General Musharraf launched a campaign against extremism in January 2002, banning the worst-offending groups.
However, continuing attacks have shown the limitations of the government’s policy.
And violence in Balochistan puts a further strain on Pakistan’s security forces which are faced with challenges from the Taleban and remnants of al-Qaeda, and have to deal with confrontations with India over Kashmir.