Nick Timothy is Director of the New Schools Network and a former Chief of Staff to Theresa May.

While for the second time this year the people of Paris mourn for their dead following a terrorist atrocity, the only certainty is that France and the other countries of Europe will be targeted again and again by our enemies in ISIS, Al Qaeda and their affiliates.

When similar attacks have been carried out in the past, political leaders across the continent have declared solemnly that “the terrorists must not win”, before going about their business unchanged.  But the terrorists do not “win” when the security and intelligence agencies and the police gain new powers to keep the public safe.  They do not “win” when they are forced out of the territories they occupy and from where they plan to attack us.  They do not “win” when we kill them in significant numbers.  They win when they succeed in taking the lives of innocent civilians.  They win when their attacks persuade weak leaders to refuse to take action against them.

This is what happened the last time a European country suffered an atrocity on the scale of the Paris attacks.  The Madrid train bombings of 2004 occurred three days before the Spanish general election. They killed 191 people, left more than 1,800 injured, and they led to the election of the Zapatero Government, which promptly withdrew Spanish forces from the Middle East.

The deliberate decision by ISIS to target France – which is playing a prominent part in military action in both Iraq and Syria – is an attempt to bomb the French out of the international coalition against them.  And it is, perhaps, a reflection of ISIS’s own weakness and desperation as it loses some of the territory it gained last year.

This is not an argument in favour of perpetual intervention in Middle Eastern wars.  The invasion of Iraq was a failure on almost every measure.  The removal of Muammar Gaddafi has created a dangerous vacuum in Libya, in which Islamist militias, including ISIS, prosper.  And the proposed military intervention in Syria in 2013 – which was only stopped when the Government was defeated in the Commons – risked helping rather than hindering extremist militias including ISIS and the Al Qaeda affiliate al-Nusra Front.

But the threat from ISIS to Britain, Europe and the West is clear.  They have already attacked not just France, but Belgium, Tunisia and Turkey; they inspired the attack on the Canadian Parliament last year, and a group affiliated to them blew up the Russian airliner flying out of Sharm el-Sheikh.  Andrew Parker, the Director General of Britain’s Security Service, has warned that there are “plots against the UK directed by terrorists in Syria.”

It should be obvious that we cannot afford to allow ISIS to establish a terrorist state so close to Europe.  Yet – with the Government deterred by the defeat in the Commons, which after all was a vote to bomb Bashar al-Assad and not ISIS – Britain is still restricted to taking part in military strikes in Iraq, but not in Syria.  While Belgium, Denmark and the Netherlands, like Britain, are participating in strikes in Iraq, France remains the only European country that is contributing to the coalition against ISIS in both Syria and Iraq.

If solidarity with the people of France means anything, then the countries of Europe – including Britain – have to take responsibility and play their part in destroying ISIS.  But the military capabilities of European countries are pitifully weak.  The United States accounts for 75 per cent of all NATO spending, while figures released by the alliance show that only the US, Britain, Poland, Greece and Estonia meet the NATO target of spending two per cent of GDP per year on defence.

And it is not just foreign policy and defence spending that the countries of Europe need to change.  European leaders have known about weaknesses in the EU’s external border for a long time.  In 2011, France threatened to reimpose controls at its border with Italy because the Italians were issuing tens of thousands of residence permits to foreigners who wanted to get to other parts of Europe.  Greece has struggled to control its border with Turkey – a transit country for people from Asia and Africa – for many years.

If the EU’s external border has proved difficult to control, it gave up on controlling the borders between its member states two decades ago.  Schengen rules have fuelled the migration crisis, but they also provide an opportunity for organised criminals and terrorists to travel around the countries of Europe unimpeded.  There is already speculation that at least some of the terrorists involved in the Paris attacks were connected to Belgium, and suspects have been arrested in Molenbeek, a district of Brussels that has long struggled to deal with extremism.  Meanwhile, the EU’s porous external border, the absence of internal border controls and poor law enforcement in many continental countries mean that machine guns and other illegal weapons can be moved from the Balkans to countries like France with alarming ease.

The trouble, though, is that so few leaders in Europe have the understanding and the political will to take the measures that are needed to protect their citizens.  A Bundestag inquiry into the activities of foreign intelligence services in Germany is threatening court action to access secret British and American intelligence material – a move that will inevitably restrict the level of cooperation between our agencies and their German counterparts.  As one German source told the press: “without the information from British signals intelligence we would be blind” and unable to monitor German nationals returning home after fighting in Iraq and Syria.

Since 2007, successive British governments have fought for a new Passenger Name Records Directive, which would give the authorities access to airline passenger data for people travelling on international flights.  This is a vital measure that would allow the authorities to keep tabs on the movements of terrorists and criminals, yet – having been approved by the Council of Ministers – the proposal was blocked by the European Parliament in 2013.  And despite a new commitment to agree the directive following the Charlie Hebdo attacks in January, it is still not clear that the European Parliament will ever allow the directive to pass.

And it is not just the European Parliament.  The European Commission often behaves as though there is no security threat at all, while last year the Court of Justice struck down the Data Retention Directive, which governs the retention of communications data, which is another vital capability in the fight against terrorism.  The Court did so because of the directive’s supposed inconsistency with the “rights to respect for private life and to the protection of personal data” as set out in the EU’s Charter of Fundamental Rights.

This ruling was a shock because, five years earlier, the European Court of Human Rights had upheld the far more intrusive interceptions legal regime in its landmark ruling of Kennedy v the United Kingdom.  But the Lisbon Treaty made the Charter of Fundamental Rights legally binding, so we can now expect the ECJ to become even more aggressive in its human rights rulings than even the European Court of Human Rights – despite the fact that Article 4.2 of the Lisbon Treaty makes it clear that “national security remains the sole responsibility of each Member State“.

The problem for Europe, however, goes much deeper than the European Parliament, Commission and Court of Justice.  The countries of Europe need to get real – on foreign policy, defence spending, border control, and their attitude to surveillance and investigatory powers – because if they do not take responsibility for the safety of their citizens, we will see more terrorist outrages perpetrated in European towns and cities, and more innocent people will die in vain.