Tens of thousands of Muslims will denounce terrorism and pledge allegiance to a “peaceful caliphate” at a major faith gathering in Hampshire.

Organisers expect more than 30,000 Ahmadi Muslims from around 100 countries to attend the three-day event - known as the Jalsa Salana - to challenge misinterpretations of Islam.

Britain’s largest Muslim convention will open on Friday with a traditional sermon and on Saturday, the sect’s leader, Hazrat Mirza Masroor Ahmad, will deliver his keynote speech to 15,000 Muslim women.

He has previously called for mosques to be more open and transparent and for authorities to monitor places of worship to tackle extremism.

Speaking ahead of the gathering, he urged his fellow Muslims to win “hearts through the power of love, grace and compassion”.

“The only thing the terrorists are achieving is to completely violate the teachings of the Holy Quran and of the Holy Prophet Muhammad," he said.

“Let it be clear that they are not practising Islam, rather it seems as though they have invented their own hate-filled and poisonous religion.”

The Ahmadiyya Muslim Community (AMC) said the event showed it was “taking a stand” against terrorism in the wake of attacks in London and Manchester earlier this year.

One of first Muslim same-sex marriages takes place in UK

On a visit to London in March, the caliph condemned the Westminster terror attack, calling it a “barbaric atrocity" and an “affront to the teachings of Islam”.

Farhad Ahmad, an imam from AMC who is helping to coordinate the gathering, said the Union flag would be raised along with the Ahmadi flag as a symbol of integration.

“People often ask 'where are the moderate Muslims condemning these attacks?’” he said.

“Here are 38000 Muslims men, women and children doing just that whilst displaying big banners of 'love for all hatred for none' for three days.”

Established in 1889 in India, the AMC is led by a spiritual caliphate, with 10 million followers around the world. Most live in India and Pakistan but around 35,000 live in the UK.

Ahmadis have been persecuted throughout history by orthodox Muslim groups.

In 1974, Pakistan's first elected Prime Minister, Zulfikar Ali Bhutto, introduced an amendment to the constitution that ruled the sect non-Muslims.