The European Commission is finalising plans to be published this summer for EU nations to swap, within 15 minutes, information they hold on suspected terrorists from third world countries such as Syria.

Brussels officials assumed that the UK would want to be part of what will be a significant strengthening of Europe’s armoury against terrorism. Until Wednesday, that is, when Theresa May’s Article 50 letter triggering formal Brexit talks suggested a trade-off between the UK’s role guaranteeing Europe’s security with its ability to trade with the EU 27.

To say it went down badly in European capitals is an understatement. Her timing was awful after the strong messages of support to the UK from EU leaders after the terrorist attack at Westminster. It might not have been intended as a threat, but was bound to be interpreted as one. UK ministers had to hit the phones to reassure their EU counterparts that Britain would not withdraw cooperation on crime and terrorism. It was never going to happen, as it would have hurt the UK as well as the EU. “We overshot the runway,” one Conservative MP admitted.

'We already miss you': Donald Tusk after receiving Article 50 letter

Fortunately, the reassurance strategy appears to have worked. Both the UK and EU are now resorting to the old trick of blaming the media for exaggerating the alleged threat. C’est la vie in my trade.

Yet it was an unforced error by May that overshadowed her otherwise positive and constructive approach to the tricky negotiations that lie ahead. She should have known better. A year ago, her aides made clear the EU cooperation on security she had seen as Home Secretary tipped the balance (narrowly) in favour of her backing Remain rather than Leave in the referendum. In a speech last April, May said Britain would be “less safe” without the effective cooperation between different European law enforcement organisations. “My judgement, as Home Secretary, is that remaining a member of the EU means we will be more secure from crime and terrorism,” she added.

May’s retreat is another sign that EU leaders are firmly in the driving seat. They were always going to be once Article 50 was invoked. Today, the penny finally dropped. The EU’s draft negotiating guidelines rejected May’s call for parallel talks on a divorce settlement and a future trade deal. Donald Tusk, President of the European Council representing the 27 leaders, said they alone will decide when “sufficient progress” has been made on issues such as Britain’s exit payment. Only then can the negotiations turn to trade and other issues. He hoped this would happen by this autumn, ratcheting up the pressure on Britain to agree a divorce payment in principle. Tusk also made clear that the UK would still have to be subject to European Court of Justice (ECJ) rulings during any transitional period after it formally departs in 2019.

A settlement running to tens of billions of pounds and a continuing ECJ role will be very hard for May to sell to the hardline Tory Brexiteers, who have appeared to call the shots until now. The Prime Minister has failed to prepare them for such bad news. Instead she pursued another reassurance strategy – to convince the Brexit brigade that she could be trusted to deliver their prize even though she backed Remain.

Her letter to Tusk belatedly prepared the ground for the compromises needed to get a deal. It was a cold shower of realism for the hardliners. It showed that May believes a “positive partnership” with the EU would be much better than a clean break and World Trade Organisation tariffs and other barriers. Some ministers favour this, including the International Trade Secretary Liam Fox, even though most businesses are appalled by the prospect.

May’s letter showed that she is on the side of the pragmatists, led by the Chancellor Philip Hammond, who want an EU agreement. She has been hinting at this privately to pro-EU Tory MPs. She is said to have remarked that she had not “suddenly become some crazed Brexiteer” who was going to “just jump off a cliff”. But the pro-Europeans were starting to doubt her, especially in January when she said she might walk out of the talks without a deal (a threat dropped from this week’s letter).

The problem is that, if May sticks to her new conciliatory tone in the negotiations, the hardliners could turn their guns on her – backed by her current cheerleaders in the pro-Brexit press. At some point, both will probably urge her to walk out without an agreement.

She knows full well that Tory divisions over Europe have wrecked the careers of the party’s last three prime ministers. So there will be times over the next two years when she will be tempted to put party management first – not least to ensure her own survival.