There are few places where the public are more vulnerable than on a packed train.

The terror and panic on the southbound LNER train on Saturday must have been appalling. The attack escalated quickly, with hundreds of people justifiably afraid for their lives.

In such a claustrophobic situation, amid the blood and the screams of the injured, passengers will have been frantic to get to safety, trampling over one another in the process.

As one of the survivors said, ‘You are in a box and you can’t get out.’ There is nowhere to run and very few places to hide.

As news of the stabbings broke on Saturday, my mind leapt back to an incident in a busy commuter carriage when I was with the Met.

The service was heaving, with standing room only. But one seat was free – and a scruffy, scowling man in the seat beside it aggressively refused to let anyone sit there. I sat down anyway. When he started swearing at me, I showed him my warrant card and asked to see his ticket.

His anger escalated and that’s when I realised everyone in the carriage was in immediate danger.

If he had a knife, the first person he’d stab was going to be me – but then he might turn on the other passengers.

I stood up and ordered everyone in the aisle and adjacent seats to back away. Fortunately, they didn’t argue. The time to ask questions is later on.

Once I had some elbow room, I was able to drag the man, who was shouting and lashing out, onto the floor and put him in an arm lock.

It later transpired he had a long history of violence and mental illness and had recently stopped taking his medication.

From the initial reports, it appears that Saturday’s violence was probably the result of some sort of psychotic episode, rather than terrorism.

Like Valdo Calocane – the paranoid schizophrenic who stabbed three people in Nottingham in 2023 – the attacker could have had mental health problems.

One passenger reported him saying: ‘The devil’s not going to win,’ while another said he looked like he ‘had a mission to stab anyone he saw right in front of him’.

What a vision of hell – and one that is all too easy to conjure for the nearly four million people who take a train every day.

Even more use the underground networks in London and other cities. Just about all of them will be aware of Saturday’s nightmare, and will now inevitably be warier than normal, even fearful.

The most effective solution to these terrifying incidents would be to have experienced police officers on every train, just as there are at football matches and other crowded gatherings.

But that is impractical. There are far too few officers on the force, and many of those who do wear the uniform would have little chance against a determined attacker, even if he was unarmed. The days when most PCs were built like a rugby forward are long gone.

Emergency services on the tracks by the train at Huntingdon station in Cambridgeshire

During my decades in the police, a tacit arrangement existed with British Rail and the London Underground, whereby serving police were able to travel for free, on the understanding that if trouble broke out we would intervene.

That helped to prevent countless incidents, and may well have saved more lives than anyone can guess.

But in an age when off-duty officers can find themselves being prosecuted for attempting to arrest criminals, many are now understandably reluctant to get involved.

If we can’t put police on every train, the obvious solution is to prevent passengers from carrying weapons. That too is extremely difficult. No one wants airport-style security at train stations.

We have to arrive up to two hours early for our holiday flights, and that’s impossible for the millions on their daily journey to and from work. Airports have purpose-built concourses for baggage inspections and metal detectors. The railway infrastructure could not be adapted for that.

The only plausible alternative is to ramp up stop-and-search powers. They really do work. But that is a politically explosive issue.

Between 2008 and 2012, I ran an anti-knife crime initiative called Operation Blunt 2 for the Metropolitan Police.

We set up squads of hand-picked plain clothes officers with a remit to search anyone they suspected of being involved with street gangs.

Our tactics worked. Knife deaths where Blunt 2 operated were reduced by more than two thirds, from 27 one year to eight the next. And, tragically, when the initiative was cancelled, the death rate shot straight back up.

I had the same success during two previous crackdowns on street crime, with the Brixton Robbery Squad in the late 1980s and with the Met’s Operation Eagle Eye in 1995.

Stop and search works. But it relies on common sense. Unlike airport security, which regards all travellers as suspects, police need to focus on likely offenders.

That doesn’t mean everyone who is checked might be carrying a weapon. Far from it – the vast majority of people from all communities and all age groups are law-abiding. But the fact remains that knives are mostly carried by young males, especially those in areas where gangs operate.

If Britain is to avoid another mass stabbing, perhaps even deadlier than Saturday’s horror, police chiefs and politicians need to confront their fear of stop-and-search campaigns.

And in the meantime, my advice to anyone travelling by rail is to remain alert at all times.

Trust your instincts – if a fellow passenger is making you uneasy, get away as quickly as possible and don’t worry if that makes you look rude.

If you are threatened with a knife, comply immediately. Don’t argue, just hand over whatever you have to. And pray that there’s a policeman nearby.