Jeremy Corbyn’s set-piece speech on defence and security yesterday contained two fundamental truths. Corbyn was right both to say that “we need a smarter way to reduce the threat from countries that nurture terrorists and generate terrorism,” and to commit Labour to a “foreign policy [that] reduces rather than increases the threat to this country.”

Unfortunately, behind that rhetoric the rest of the speech failed to deliver anything of the kind. Labour under Corbyn, like much of the wider left in Britain, has failed to engage with foreign policy and especially the threat from radical Islamic terrorism on anything other than the most shallow and basic terms. In part this is down to the left’s tendency to naïveté, hoping that praying for peace will be its own success – the kind of utopian fantasia that leads to the leader of the Labour Party standing at a lectern discussing “conflict resolution” techniques as a serious response to the threat posed by ISIS.

Mostly, however, it is down to the obsession on the part of much of the left with ‘anti-imperialism,’ the dominant strand of foreign policy thinking of the Stop the War Coalition, the far and extreme left and the Labour leader, himself of course a former chair of StWC. This mode of thinking stubbornly places the blame for all manner of global unrest at the door of ‘the West,’ its supposed ‘imperialism’ and especially its foreign policy interventions. The fact that this worldview ends up allying its adherents with the self-justifying rhetoric of Putin’s Russia and the propaganda of ISIS should not go unremarked and should tell you all that you need to know about its value as a way to genuinely understand the challenges posed by Islamist terrorism and how they can be overcome.

‘Western foreign policy’ doesn’t explain ISIS – as Dr Azeem Ibrahim explained in the Daily Telegraph back in February 2016, ISIS’s primary targets are other Muslims, specifically the Shia, and its attacks overseas have targeted everywhere from Muslim Indonesia to those well-known hotbeds of Western imperialism Belgium and Sweden. To blame our foreign policy for the fact ISIS inspires deeply troubled young men to murder innocent men, women and children is not only naïve and uninformed, it is feeding into the same mendacious narrative that the terrorists use to recruit more troubled young men to commit yet more atrocities.

So, Corbyn is right when he says that we need a policy which reduces rather than increases the threat to this country from radical Islamic terrorism. He is wrong, however, on what that policy is.

A foreign policy that reduces the threat posed by Islamist terror to the West – and to the rest of the Muslim world, its main target and victim – looks like more engagement in the region, not less. Simply put, it means defeating Islamist terrorists. Liberal intervention has few advocates these days, but unless we accept that there can be no negotiation or coexistence with this wicked creed and confront it, cold-eyed and head-on, we will not prevail. That looks like military action, yes, and we should say so unflinchingly and without fear – our failure to intervene in Syria in 2012 created a vacuum in which ISIS have thrived and now looks to have been a terrible mistake. By committing to defeating ISIS, we are committing to do so militarily.

But, crucially we are also committing to continued and expanded engagement in the region. The root causes of extremism in the Middle East – poverty, sectarian conflict, corruption and economic failure, rampant inequality and repression – which leave so many vulnerable to radicalisation by this millenarian death-cult must also be tackled in partnership with our allies and the governments of the region, or we risk another generation of young men falling under the sway of a poisonous, perverse ideology, who’s only hope for a better life flows from the barrel of a gun. That, too, must be undertaken with open eyes and a clarity of purpose, not with premature cries of ‘mission accomplished’ and demands to cut and run before the job is done.

Just as we cannot flinch from the scale of the task in Syria, Iraq and the Middle East, nor should we downplay the size of the task at home. My colleague Rabbil Sikdar wrote earlier this week on the challenges that radicalisation and extremism pose in Britain and I echo his thoughts wholeheartedly. Simply put, alongside funding our police and intelligence operations effectively Labour must put integration at the heart of its domestic security agenda and work far more to support liberal voices in the Muslim community, as well as wholeheartedly challenging regressive and illiberal attitudes and practices wherever we find them, without fear or favour.

We must also accept that solidarity is not, on its own, enough to defeat terror. Much is made of the indomitable British ‘Blitz spirit,’ but that ‘keep calm and carry on’ ethos on the home front in the 1940s was just one part of a wider war effort whose goal was the total destruction of Nazism. We were unafraid to name our enemy, and to take the fight to him wherever we found him. A similar effort is needed in 2017 if we are to defeat extremism at home and abroad – simply wringing our hands and refusing to confront the harsh realities of the situation is no solution at all.

Undoubtedly this will take many years and a huge commitment of energy and resolve, but half-measures and half-hearted interventions will not suffice. There can be no capitulation and no equivocation. We must win the war on terror, and then we must win the peace.