In this time of political uncertainty, we can be certain about one issue. The battle against Islamist extremism is one we are losing. News of 23,000 jihadis living in Britain, each considered to pose at least a “residual risk”, indicates the breathtaking scale of the challenge facing us. The horse, as they say, has well and truly bolted.

We need to learn lessons from previous mistakes, including our comatose response to growing religious fundamentalism. Yet the truth is we remain blind to the facts. With our liberal blessings, extremist preachers are free to promote their hatred, virtually unchallenged. Anjem Choudary radicalised hundreds, if not thousands of Muslims freely over 20 years. As a result, he influenced more than 100 Britons to carry out or attempt to carry out terrorist attacks at home and abroad.

We defended the right of extremists to free speech in the belief that the most effective way of undermining them was for us to counter their speech. This was nice in theory; there was, however, one rather large problem. Apart from a handful of people, no one did counter them. And those who did were promptly labelled “Islamophobes.”

Fully exploiting the uncontested space we provided them, extremists promoted their supremacist, hate-filled ideology to thousands of Muslims on satellite channels, through social media, on campuses and community events, day in, day out. In the battle of ideas, deconstructing their ideological world view was then and remains now one of our greatest failures. And fail we did – collectively, as Muslim institutions, human rights organisations, anti-racist groups and governments.

While the Muslim Council of Britain perfected the art of issuing press statements, it did nothing to push back on such poisonous teachings. For 10 years, my organisation Inspire, in an attempt to build resilience to extremism in Muslim families, taught theological counter-narratives to extremist ideology. The response I heard from hundreds of Muslim mothers was the same. No one has taught us this before and no one has taught our children it either. What was apparent is that the weak “community” defence system would not be able to hold back the tidal wave of extremist propaganda.

As extremists continue to radicalise people, we, however, are still flapping our hands over what we even define as extremism. Extremism has never been just about violence. Inciting hatred, discrimination and supremacist ideals for political, religious or ideological causes should be considered extreme in a 21st-century Britain which aspires to establish a culture based on equality, human rights and a pluralistic outlook. Yet thousands of videos of extremists such as Abu Haleema who seek to radicalise remain online.

Our inability to recognise the ideological nature of the beast, in particular Salafist, Islamist and Barelvi-inspired extremism, meant we never fully understood who the key extremist groups, websites and preachers were. We lack the essential insight into the activism of these groups and their influence among British Muslims.

Instead of recognising the diverse picture, we blindly continue to lump all 3 million Muslims – the good, bad and ugly – all under the mythical banner of a “Muslim community”. This serves the interests not of the ordinary Muslim, but of the extremists who hide behind this same banner. As a result, we continue to legitimise the voices we should be calling out.

Take Sky News for example. Last week, it invited Dilly Hussain of the Islamist-run website 5Pillars to take part in a discussion on how we should tackle Islamist extremism. Hussain has expressed his support for key 20th-century jihadi ideologues including Sayyid Qutb and Abdullah Azzam. Qutb’s book Milestones became the blueprint for modern-day Islamist extremist ideologies and influenced Osama bin Laden. Azzam is a pivotal ideologue in shaping the al-Qaida network. Yet despite this, you may want to ask why is it 5Pillars has more than 184,000 likes on Facebook alone? Yet here was Sky News asking an Islamist sympathiser how we should tackle Islamist extremism.

So what do we need to do ? Inevitably, a huge responsibility falls on Muslim faith leaders and institutions in our country. Statements condemning terror attacks do not reduce the Islamist threat we face, nor address the challenge of 23,000 jihadis. They have a religious obligation to build resilience in teaching young Muslims theological counter-narratives to extremist ideology, while promoting a contextualised understanding of Islam in the UK and amplifying such teachings to the masses both in the online and offline space.

We must provide platforms for young people to air their grievances, whether they are concerns around anti-Muslim prejudice or foreign policy and challenge wild anti-western conspiracy theories. It is vital that we hammer home the message that violence and terrorism, no matter what grievances the terrorists claim to hold, is never justified in Islam. Crucially, Muslim activists and scholars must weed out the extremists in our midst who justify their beliefs in the “name of Islam.” As one scholar said last week, it’s time we #CallEmOut.

Second, we need to start investing in grassroots Muslim counter-extremism organisations. At the moment, these lack essential funding and resources. Philanthropies and charities have a social responsibility to support Muslims who are on the frontline. A disastrous combination of muddled thinking about political correctness and a risk- averse outlook has acted as an obstacle.

Government must do more to explain the threat emanating from Islamist terrorism and build trust among Muslims so we work together in countering the extremists. This work should be supplemented with broader government strategies that empower communities through programmes of engagement, inclusion and integration.

Investing and reinvigorating a civil society movement based on our shared values is desperately needed to push back against the extremists. This requires all of us to defend our values over and above political correctness or religious sensibilities, to help build the united Britain we all want. We have already lost too much ground to Islamist extremists. We will continue to do so unless we urgently step up to the mark.

Sara Khan is author of The Battle for British Islam: Reclaiming Muslim Identity from Extremism, and director of the counter-extremism organisation Inspire. @wewillinspire.