Among the consequences of the atrocities in Paris – many of them impossible to foresee so soon after the terrible events – one seems reasonably clear. The state is returning to its primary function, which is the provision of security. If the SAS has been on the streets of London and Brussels under lockdown, these are more than responses to the prospect that further attacks may occur. What we are witnessing is the rediscovery of an essential truth: our freedoms are not free-standing absolutes but fragile constructions that remain intact only under the shelter of state power. The ideal liberal order that was supposedly emerging in Europe is history. The task of defending public safety has devolved to national governments – the only institutions with the ability to protect their citizens.

The progressive narrative in which freedom is advancing throughout the world has left liberal societies unaware of their fragility. Overthrowing despots in the name of freedom, we have ended up facing a situation in which our own freedom is at stake. According to the liberal catechism, freedom is a sacred value, indivisible and overriding, which cannot be compromised. Grandiose theories of human rights have asserted that stringent limitations on state power are a universal requirement of justice. That endemic anarchy can be a more intractable obstacle to civilised existence than many kinds of despotism has been disregarded and passed over as too disturbing to dwell on.

But one modern thinker understood that a strong state was the precondition of any civilised social order. With his long life spanning the English Civil War, Thomas Hobbes (1588-1679) was convinced that only government could provide security against sectarian strife. Anyone who wanted the amenities of “commodious living” had to submit to a sovereign power, authorised to do whatever was necessary to keep the peace. Otherwise, as Hobbes put it in a celebrated passage in his masterwork Leviathan (1651), there would be “no arts, no letters, no society, and, which is worst of all, continual fear and danger of violent death, and the life of man solitary, poor, nasty, brutish, and short”.

Hobbes has been criticised by liberals for neglecting the necessity of protection from the state – a need that was clear in the 20th century, when the worst crimes were the work of totalitarian regimes. But one need not accept all of Hobbes’s political theory, with its fictitious state of nature and social contract, to see that he captured some enduring realities that liberals have chosen to forget. The form of government – democratic or despotic, monarchical or republican – is less important than its capacity to deliver peace. At the present time, it is not the state but the weakness of the state that is the greater danger to freedom.

Consider the migrant crisis and how it is likely to develop in the aftermath of the Paris attacks. The first and most obvious ­reality is that the crisis has been driven by a flight from failed or failing states. The largest single category of migrants has come from Syria, which has been devastated by a many-sided civil war in which the West – along with its ally Saudi Arabia and other Gulf states – has intervened with the aim of toppling the regime of Bashar al-Assad. Others come from Iraq, Afghanistan, Eritrea, Somalia, Sudan and elsewhere. But it cannot be accidental that so many of these migrants are fleeing countries whose states have been dismantled by western policies of regime change. Migrant flows have other causes, such as environmental degradation in Africa and the economic opportunities that are available in European countries, which will persist long after war in the Middle East has ended. The chief driver at present remains failed states and it is wishful thinking to imagine that these states will be repaired any time soon.

Destroying states is relatively easy, while re-creating them is very difficult. Iraq and Syria will not be reassembled in a recognisable shape in any realistically imaginable future. Similarly, effective government will not be restored in the jihadist-ridden chaos that is now Libya. Politicians who tell us that the solution to the migrant crisis is to stabilise the migrants’ countries of origin are not being serious, or honest. None of them has any clear idea of how to accomplish such a feat, or is willing to face the enormous difficulties and costs that the task would involve.

By creating failed states, the West brought into being the zones of anarchy in which Isis (also known as Islamic State) has thrived. It will be objected that the states that were destroyed were brutal dictatorships. But Saddam Hussein’s Iraq was a secular despotism and so, too, is Assad’s Syria. In working to overthrow these regimes, the West has released the forces of theocracy and come close to eradicating secular government in the Middle East. Worse, by persisting in its efforts to topple Assad, the West risks producing a catastrophe greater than any that has yet occurred. If Assad were violently overthrown, the Syrian army would likely disintegrate and the state of Syria cease to exist. The country would become an anarchical killing field in which dozens of jihadist groups compete for power. Communities that had depended on Assad’s regime for their survival, such as the Alawites, Druze and Christians, would confront a threat of genocide as real as that which has faced the Yazidi in Iraq. The result would be enlarged flows of desperate people into Europe. By intensifying the war, Russia’s involvement in Syria is likely also to swell these flows, though not by as much. In the longer term, Russian intervention opens up the possibility of some kind of political settlement in which Assad can be induced to give up power.

The West continues to reject co-operation with Russia on the grounds that Vladimir Putin and his client Assad are evil tyrants. From a Hobbesian standpoint, this is irrelevant. The salient question can only be: which is the greater evil? How is Assad’s dictatorship worse than a cult that abducts and rapes children, kills women it considers too old for sexual slavery, throws gay men off roofs, assassinates writers, cartoonists and Jews, murders dis­abled people in wheelchairs and razes irreplaceable cultural sites?

It is true that, with his barrel bombs and torture centres, Assad may have killed more people than Isis but this is not for want of the jihadists trying. They have launched mass-casualty attacks in Turkey, Lebanon, Egypt, Syria, Iraq, Pakistan and Afghanistan, among other countries where the victims have been overwhelmingly Muslims; and, if they can get their hands on biological or other weapons of mass destruction, they will surely use them. By any reasonable standard, Isis is a vastly greater threat to world peace than Assad.

***

The impact of the Paris attacks will be profound. Casualties are a fraction of those of the 9/11 attacks on the US but Europe is incomparably more fragile. A fatal blow has been dealt to the Schengen dream in which people are free to roam across a borderless European continent. Though some controls were planned ahead of the climate summit that starts in Paris on 30 November, the imposition of border checks immediately in the wake of the attacks testifies to a stark fact. European institutions lack the capacity to tackle a security challenge of this magni­tude. Only national governments possess this power and, by reclaiming control of their borders, they are revealing a fundamental vulnerability in the EU.

Already, Bavaria’s finance minister, Markus Söder – a member of the Christian Social Union, which has been sharply critical of Germany’s chancellor, Angela Merkel – has declared that, with the Paris attacks, “everything changes” in Germany’s open-door approach to migrants. At the same time, Konrad Szymanski, Poland’s incoming minister for European affairs in the government that is being formed after the Law and Justice Party won the election in October, has announced that Poland cannot accept migrants allocated to it under a European quota system without stringent security checks. Even before the Paris attacks, Sweden had suspended Schengen, arguing that it was struggling with the influx of refugees. With Europe paralysed, the continent’s nation states are seizing control of their borders to stem a mounting threat to their citizens’ security. Just two days before the attacks, European leaders gathered in Malta to reaffirm their commitment to welcoming migrants. Now a different scenario is emerging. One by one, European governments are adopting policies of which the overall effect looks like the beginning of the end of the era of mass migration into Europe.

To many liberals – not least Barack Obama, who has condemned any such reaction as hysterical – European leaders seem to be succumbing to xenophobia when they should be defending openness and common humanity. But it is worth considering the situation from a Hobbesian point of view. Controlling the flows of people cannot neutralise Isis militants who are already here. Some will have entered Europe years ago, or been born in a European country and then travelled to war zones where they were trained in terrorist skills. Even so, uncontrolled immigration on the scale that has been reached in the past year cannot avoid posing security risks in conditions that ­approximate those of war. If Isis militants form only a tenth of 1 per cent of the ­million or so migrants who have entered Europe to date, a thousand or more new risks have been created. When it is recalled that the Isis militants who have returned from Syria to Britain are believed to number in the hundreds, the danger is clear enough. A major terrorist threat can be created by very few people.

The weakness of the EU in this regard is a direct result of the freedom of movement that has been one of its defining features. As a borderless zone, it can control the movement of people only at its perimeters. But when the frontiers of France are, in effect, in Greece (through which the suspected ringleader of the Paris attacks is reported to have travelled when returning from Syria), tracking travellers is practically impossible. Rather than being an overbearing super-state, as many Eurosceptics have claimed, the EU is a pseudo-state, an institution that claims many of the prerogatives of statehood but cannot meet the primary and overriding need for safety that states exist to serve.

Moreover, this pseudo-state contains at least one semi-failed state. The fractured and paralysed state of Belgium has been a jihadi haven from which attacks could be launched. At least two of those implicated in the Paris attacks had links with the Brussels suburb of Molenbeek, as did jihadists involved in previous terrorist incidents.

The unfolding pattern of the attacks must also be taken into account. Uniquely among jihadist groups, Isis has demonstrated the capacity to join guerrilla warfare and spectacular acts of terror into a single strategy. The Paris attacks were a reaction to defeats on the ground in Syria, where Isis has been forced to retreat in the face of advances by Syrian government forces, backed up by Russian air power and Kurdish fighters. If it suffers further defeats, Isis will step up its campaign of urban terrorism in western countries. More stringent security measures cannot prevent this assault. Suspects can be identified and some plots foiled but there is a limit to what can be done when every member of the population is a target. As long as Isis exists, its attacks will continue.

***

Given how the “war on terror” created some of the conditions that led to the rise of jihadism, it is daunting to contemplate the prospect that further military action may now be needed. Yet François Hollande may be right in urging that, at this point, the only effective recourse is the Islamic State’s destruction by the combined might of western and Russian military force. Since, unlike al-Qaeda, Isis is a territorial unit, with supply lines and infrastructure, this is not an unrealisable objective. The unanimous UN resolution passed on 20 November to do whatever is necessary will help. But intensified bombing will not be enough and whether the will can be summoned for an operation requiring large land forces (which would suffer significant casualties and have to remain in place for many years) is an open question.

In a region where the enemy of your enemy may well be another enemy, the geopolitical ramifications of such an operation are labyrinthine. Any prospect of co-operation between Russia and the West in the fight against Isis could be stymied by incidents such as the recent shooting down of a Russian plane by Turkey. The risk-averse Obama administration shows no stomach for the job, while in the UK David Cameron’s enthusiasm for British involvement is at odds with his government’s record of hacking away at core state functions, including massive reductions in defence spending and ongoing cuts in front-line police, in the pursuit of fiscal austerity.

Concerted action against Isis on the scale that is required may not be feasible in current conditions. But even if the will to act can somehow be summoned, Isis will not go down without launching more assaults on western cities. That is why the powers of the state may need to be expanded, including restrictions on freedom that many liberals will want to reject out of hand.

Here again, it is worth considering a ­Hobbesian view. Liberals have reacted with horror to government proposals to allow intelligence agencies to collect internet data. This response is not altogether unfounded, since clear safeguards are plainly needed. Allowing security agencies to trawl through our emails entails a loss of ­privacy, which is an important dimension of freedom. A universal surveillance society is not a pretty prospect. Politicians who say that there is no conflict between freedom and security are deceiving themselves and us. The conflict is genuine but it is also un­avoidable. Those who want to treat liberal freedoms as sacrosanct should ask themselves what price they are willing to pay for these liberties.

It is not just security that is compromised if the freedom of privacy is treated as untouchable. Other freedoms are, too. Mass surveillance cannot deal with the conditions that have led people to jihadism. Life in the banlieues, blighted by generations of neglect and racism, is part of the background of the Paris attacks. Nor can mass surveillance be relied on to prevent future attacks. Sifting through data is an unending task; threats are multiple and continuously mutating. But monitoring internet traffic can still be useful and, in some cases, it may be vitally important. To rule out collecting data to protect privacy makes sense only if you accept that the risk to other freedoms may thereby be increased. In recent liberal philosophy, freedom is seen as a fixed system of interlocking and mutually reinforcing rights – the dovetailing liberties of John Rawls, Ronald Dworkin and other liberal legalists. Outside the law courts and the seminar rooms, the reality is continuing conflict. One freedom collides with another and sometimes we have to choose between them. Does it make sense to be uncompromising in protecting privacy, while surrendering the freedom to publish satirical cartoons?

Freedom is not indivisible. Politics is the continuing choice among liberties that comes with the earthy business of rubbing along together. Different faiths, cultures and traditions have to learn to co-exist. Aside from their many benefits, plural societies are an unalterable fact of modern life. But they can be made to work only so long as the state has the means and the will to enforce a common peace. If mainstream parties cannot rise to the challenge, they leave the field open to the far right.

Thomas Hobbes’s thought has limitations, some of which are relevant at the present time. Seeing violence as a means to self-preservation, he left out the ways in which human beings use violence to assert their identities and beliefs. He was fully aware of the dangerous intensity of religious passions. That is why he insisted that religion should always be under civil control. But as an early Enlightenment rationalist, Hobbes could not explain why human beings are so ready to throw away their lives and those of others for the sake of faith. Convinced that, in the final analysis, they cherish survival above all else, he thought they could be persuaded to put their beliefs to one side for the sake of peace. “Reason suggests convenient articles of peace,” Hobbes wrote, “upon which men may be drawn to agreement.” For a thinker who is usually seen – and possibly saw himself – as the supreme realist, it is a strangely unrealistic view. The history of his time and ours tells a different story. Significant numbers of human beings have often been ready to kill and die in order to secure meaning in their lives.

It has become commonplace to describe Isis’s attacks as nihilistic but “nihilism” is a term that nowadays means nothing. The term was originally applied to 19th-century Russian radicals who rejected religion in favour of science and advocated terror as a means of emancipating humankind from the burden of the past. Since then, it has come to be used to describe those who have no beliefs or values. But far from believing in nothing, Isis militants are possessed by faith. Though some reports suggest that the militants may have been fuelled by euphoria-inducing drugs, their attacks are not random acts of terror. They are moves in a methodical strategy of savagery that serves an apocalyptic myth. Isis is an explicitly eschatological movement, infused with fantasies of cataclysmic end-time battles and a universal caliphate. It is not without significance that the group has made few, if any, concrete demands.

Many of those who condemn Isis as nihilistic go on in the same breath to describe it as “medieval” – a curious conjunction. Certainly, Isis has links with Islamic apocalyptic traditions and with Wahhabism, the 18th-century Islamic fundamentalist movement that has been financed and exported worldwide by sources in Saudi Arabia and other Gulf states. Nonetheless, the idea that Isis is no more than a reversion to medieval values is misguided. Since it implies that the group is an atavistic force that will fade away in the normal course of historical development, this is actually a consoling thought. It is also an illusion.

***

It is not just in its use of the internet and social media that Isis is modern. The practice of suicide bombing was pioneered by the Tamil Tigers, who first developed the suicide belt and were, at one point, the most active terrorist group in the world. The Tigers were largely Marxist-Leninists, who killed and died for the sake of a vision of the future that is unambiguously modern. So were the followers of Pol Pot, who were ready to slaughter much of the Cambodian people to realise their fantasy of a new world. The Japanese Aum Shinrikyo cult recruited among scientists and aimed to develop biological weapons with which it planned to wipe out most of the world’s population; it succeeded in mounting a number of bioterrorist attacks, including one on the Tokyo subway system in 1995 in which thousands were injured. Isis embodies a type of apocalyptic terrorism that, in different forms, has recurred throughout modern times.

Hobbes cannot deliver us from a situation in which we have become the targets of people who embrace death and destruction. Other than unwavering determination in defending ourselves, there is no solution to that problem. What Hobbes can do is dispel the lazy certainties and idle hopes of the prevailing liberalism. The lesson of the Paris attacks is that peaceful coexistence is not the default condition of modern humankind. We are going to have to get used to the reality that “commodious living” does not come cheap.

John Gray is a New Statesman contributing writer