“So we must work with countries like Saudi Arabia and Qatar, the UAE, Egypt and Turkey against these extremist forces, and perhaps even with Iran, which could choose this moment to engage with the international community against this shared threat.”

I hone in on this single sentence in David Cameron’s article about ISIS in today’s Sunday Telegraph – partly because the rest of the article is unexceptional (though solid enough), and partly because it is well worth exploring in itself.

It isn’t so long since Iran’s nuclear ambitions were seen by British Governments as perhaps the biggest threat to stability in the Middle East.  As part of the P5+1, successive administrations went back and forth in negotiations with the Ayatollahs and their representatives.

One of them was Hassan Rouhani, formerly Iran’s chief negotiator with the “EU 3”, now the President of Iran.  Last year’s interim deal with the P5+1 over its programme marked a shift in atmosphere: not so long before, there had been serious speculation about airstrikes against the programme.

Rouhani’s election, however, is only part of the story of changing western attitudes to Iran.  Another part – and a bigger one – is the continuing rise of Sunni Islamist extremism worldwide.  ISIS is one example. Boko Haram in Nigeria is another – the subject of an angry bishop’s letter to Cameron today.

Very simply, Britain and other western countries can’t fight two opponents at the same time – not easily, at any rate.  And Sunni extremism is a threat to Britain’s internal security: if you doubt it, glance back to 7/7, 21/7, the Glasgow airport attack, the liquid explosives plot, and so on.

However, while Shi’ite extremism – that’s to say, the doctrine of Velayat-e faqih propagated by Khomenei, together with his expansionist ambitions for his version of Shi’ism – is a threat to our regional interests, it has not been one to date to our domestic security.

As recently as last summer, Britain effectively risked intervening in Syria’s civil war on the Sunni extremist side.  I argued against this short-sighted move.  Thankfully, the Commons put a stop to it.  We are now intervening, in a mild form, against the Sunni extremist side.

All in all, we must make our minds up about where the main threat to our security, interests and prosperity lies.  There can be no doubt that it sits with ISIS, Al Qaeda, and the small number of Muslims in Britain who are prepared to terrorise for both – here or abroad, as Cameron warns.

To this end, a rapprochement with Iran is a sensible strategic aim.  That shouldn’t mean going easy on the country’s nuclear programme – which could lead to an nuclear arms race in the region – or to a premature easing of sanctions.

But it should mean dangling an olive branch or two in front of the Ayatollahs.  That is what the Government has quietly been doing for some time – and what Cameron is doing again in the Sunday Telegraph today.