The attack on an Ahmadiyya place of worship has taken most Pakistani observers by surprise - there was no build up to it as is the case in most instances of sectarian violence.

The Friday attack followed a long period of relative peace for the Ahmadis through most of the 1990s, despite pressure from what is known as the anti-Ahmadiyya movement.

Described by rights organisations as one of the most relentlessly persecuted communities in Pakistan, the Ahmadiyya have seen their personal and political rights erode steadily over the years under pressure from orthodox Muslim groups.

At the core of their conflict with mainstream Muslims lies their belief that the founder of the sect, Mirza Ghulam Ahmed, was a prophet.

The Ahmadis insist that he was not a "law-giving" prophet and his job was only to propagate the laws enunciated by Islam's Prophet Mohammad. But few among the Muslim mainstream are willing to accept this argument.

Throughout the first half of the 20th century, the issue of their faith kept being raised before different courts at the district level. In many such cases, local courts ended up declaring them non-Muslims.

Persecution

In 1947, the community moved its religious headquarters from Qadian in India to Rabwah in Pakistan.

Then in 1953, orthodox Muslim groups in Pakistan came together to form what they called the "anti-Qadiani movement".

Gen Zia-ul-Haq brought in tough anti-Ahmadiyya laws

The declared objective of the movement was to ensure the removal of all Ahmadis from government service, have them declared non-Muslims, stop them from raising mosques for the community and ban them from preaching or propagating their faith.

A vociferous campaign by this movement in 1953 led to widespread rioting all over the Punjab.

Several Ahmadis were killed and scores injured in the riots which were quickly quelled by the Pakistan army.

But the so-called anti-Qadiani movement - supported by all mainstream Islamic parties in the country - continued to generate opposition to the faith through public rallies and court cases.

In 1974, under severe pressure from clerics, Pakistan's first elected prime minister, Zulfikar Ali Bhutto, introduced a constitutional amendment - known as the Second Amendment - which declared Ahmadiyya non-Muslims.

But other than a change in their constitutional status, the Bhutto government placed no other formal restriction on their activities.

Emigration

In 1984, Pakistan's longest serving military dictator, Gen Zia-ul-Haq, brought in a new law that barred Ahmadis from reciting the Kalima (the first proclamation of Islamic faith), from calling their places of worship mosques or from propagating their faith in "any way, directly or indirectly".

Ahmadiyya moved their base to the UK after 1984

Anticipating the impact of the new law, the community moved its headquarters to the UK.

But it turned out to be the darkest period for the Ahmadis in Pakistan as scores of them were arrested and sentenced for preaching their faith.

In 1987, two Ahmadis were sentenced to 118 years in prison for allegedly raising a mosque.

The Human Rights Commission of Pakistan has recorded dozens of cases against them over the years.

However, it seemed that the anti-Ahmadiyya movement was satisfied with using the courts against them - the level of overt violence remained relatively low.

The last serious attack took place near the eastern Punjab town of Sialkot in October 2000, when gunmen stormed a mosque killing five worshippers and injuring many others.

The large number of Ahmadis who migrated to other countries following the 1984 laws helped eased the situation, although religious zealots kept registering new cases against Ahmadis on various charges, including that of blasphemy.

One recent indication that the anti-Ahmadiyya movement was rearing its head again came in August when 16 publications brought out by the Ahmadiyya Jamaat were banned.

But even so, few could have imagined that members of the community - now a small minority in Pakistan - would come under direct attack.