The thought of ISIS terrorists in Europe, as officials now believe is the case, and the re-release of an Islamic State video calling for Muslims to murder Western police officers and soldiers underscore a grim reality: We cannot unilaterally end a war our enemies in the Middle East have declared on us.

Thwarting at least one attack in Belgium, officials say they nabbed dozens of suspected terrorists with ties to ISIS in several countries.

The video, meanwhile, urges followers to “strike their police, security and intelligence members,” specifically naming the United States, France, Australia and Canada as targets.

All this, after the Paris attacks by terrorists also linked to Mideast jihadists. And December’s attack in Sydney by an Australian who put an Islamist flag in a window. And a murderous attack on a Canadian soldier by a convert to Islam who police say wanted to travel to Syria to fight.

Last week, an Ohio man was also arrested for what the FBI says was a plot to launch an Islamic State-inspired attack on the US Capitol.

What these events ought to tell us is how mistaken it is to think we can end a war unilaterally — or buy our safety by ignoring the Middle East.

We are learning, the bloody way, that the Islamists are dead serious about their aims — and that the consequences of a “jayvee” terror outfit such as Boko Haram or ISIS gaining control over territory will eventually affect us, too.

That’s why American troops remain in Iraq and Afghanistan. It’s why US forces are engaging our enemies, even after the official “end” to combat has been announced. Even as we try to disengage, our enemies make clear they have no intention of ending their war against us.

Now, in the face of a Middle East dominated by conflict between hopelessly unrepresentative ­Islamic regimes and savage Islamist terrorists, there have always been those who argue that the answer is to get out and let them kill each other off. At least we wouldn’t be caught up in the conflict, goes the thinking.

Turns out just the opposite is true. As we have withdrawn and our influence has diminished, radical Islamists have grown in strength.

And the wars they are waging in the Middle East have proved effective training grounds for those who want to learn jihad and bring it back to their homelands in Europe, Australia and the United States.

In short, we cannot wall ourselves off from the Middle East, no matter how tempting it might be to think so.