The Ahmadi movement, which has its origins in British-controlled northern India in the late 19th Century, identifies itself as a Muslim movement and follows the teachings of the Koran.
However, it is regarded by orthodox Muslims as heretical because it does not believe that Mohammed was the final prophet sent to guide mankind, as orthodox Muslims believe is laid out in the Koran.
The building of mosques is a priority for Ahmadiyya communities
The Ahmadiyya community takes its name from its founder Mirza Ghulam Ahmad, who was born in 1835 and was regarded by his followers as the messiah and a prophet.
Ghulam Ahmad saw himself as a renewer of Islam and claimed to have been chosen by Allah.
According to Oxford Islamic Studies Online, Ghulam Ahmad - who was born in the town of Qadian in Punjab - "based his convictions on the belief that Muslim religion and society had deteriorated to the point where divinely inspired reforms were needed."
In the early part of the 20th Century, the Ahmadiyya movement split into two over questions of leadership.
The original branch called the Ahmadis also took the name Qadiani after the birthplace Ghulam Ahmad. According to Oxford Islamic Studies Online, this group emphasised their founder's claim to prophethood.
The second group known as the Lahore Party, regarded Ghulam as only a reformer. Both branches have their headquarters in the UK.
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.
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".
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.
Throughout the first half of the 20th Century, the issue of their faith kept being raised before different courts at the district level.
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.
A decade later, a new law was brought in barring Ahmadis from calling their places of worship mosques or from propagating their faith in "any way, directly or indirectly".
Anticipating the impact of the new law, the community moved its headquarters to the UK.
According to Islam and the Ahmadiyya Jamaat, by Simon Valentine, the movement stresses non-violence and tolerance of other faiths.
It is also zealous in its outlook and has a strong missionary programme.
It has established itself in Britain, Europe, America, Africa, and other parts of Asia, with the building of mosques a high priority. In 1982, the Ahmadiyya mosque was the first mosque to be built in Spain since the Moors were expelled in 1492.
While Ahmadis say they have 200 million followers, mainstream Islamic scholars say this is a massive exaggeration. They claim there are at best 10 million Ahmadis.
Today, the Ahmadiyya community faces restrictions in many Muslim nations, saying followers are constantly persecuted.
In 2008, in Indonesia, there was a spate of attacks against Ahmadiyya mosques by extremists, and moves by the government to restrict the sect.