Image copyright Reuters Image caption WCR also runs the Jacobite steam train in Scotland

There has not been much about it in the media, but at the beginning of March Britain was less than a minute away from what might have been one of the country's worst train crashes.

In euphemistic railway speak, it was ranked as a 25 SPAD at SN45.

To you and me, a charter steam train carrying hundreds of leisure passengers ran through a red light approaching a junction on a main line, about a minute after an express train had gone through at about 70mph.

The close call happened just before 17:30 on Saturday 7 March at a junction in Wootton Bassett, Wiltshire.

It is still being investigated, but the early report from the Rail Accident Investigation Branch suggests something very worrying - that the crew on the steam train may have cancelled the safety systems designed to automatically stop the train.

The express train would have had somewhere between 300 and 400 people on board.

The steam train, I understand, can carry about the same number.

"This was potentially a catastrophe," the editor of Rail Magazine, Nigel Harris, told me. "We were a minute away from a high-speed train hitting a steam train.

"Network Rail are quite rightly taking it very seriously."

Suspension

Network Rail took the unprecedented step of suspending the operating licence for West Coast Railways (WCR), effectively banning it from the track, until managers could prove they had beefed up their safety procedures.

Image copyright AP Image caption The company's trains include the "Hogwart's Express" from the Harry Potter books

That licence has only just been handed back, although even now the rail regulator, the Office of Road and Rail (ORR), still has the power to strip the company of its safety certificate.

WCR is by far the biggest steam train operator in Britain, running more than 500 charters each year.

They include the "Hogwart's Express" from the Harry Potter films, and what it calls one of Scotland's biggest tourist attractions, the Jacobite Steam Train, which runs from Fort William to Mallaig.

The heritage train market is big business, attracting tens of thousands of enthusiasts each year.

Automatic braking

WCR told the BBC: "We realise that measures must be taken to prevent this human error from happening again and put preventative measures and systems in place to ensure just that."

"We have worked tirelessly with Network Rail to satisfy both parties' safety requirements," the company added.

The steam train involved, locomotive No. 34067 "Tangmere", might be nearly 70 years old but it was fitted with the latest safety kit.

Two systems, known as AWS and TPWS, act as a belt and braces arrangement to stop exactly this kind of incident from happening.

Put simply, they shout out if there is oncoming danger then hit the brakes automatically if the driver does not react.

A klaxon sounds in the cab, and at the same time there is a visual cue, a "sunflower" dial that turns from pure black, to black and yellow.

If nothing happens for 2.7 seconds, the train stops itself.

Safety on the railways

Category A signals passed at danger (SPADs)

2011/12: 276

2012/13: 249

2013/14: 293

Potentially severe operational close calls

2011/12: 61

2012/13: 95

2013/14: 102

Source: Network Rail

But the system can be deactivated by the crew and that is one of the possibilities investigators are looking at here.

The preliminary Rail Accident Investigation Branch report said: "Evidence shows that the driver and fireman instead took an action which cancelled the effect of the AWS (Automatic Warning System) braking demand after a short period and a reduction in train speed of only around 8mph."

"The action taken also had the effect of making subsequent AWS or TPWS brake demands ineffective," it said.

The preliminary report says that when the crew then realised they were approaching the red signal too fast they braked.

But it was too late and the train eventually came to a halt across the junction.

Investigators have so far found no evidence of a problem with the signals or safety equipment.

Criminal charges?

It is rare that the regulator launches criminal proceedings against a train driver or their crew but it does happen.

Last year another driver was handed a suspended prison sentence for passing through a red light and overriding the automatic braking system.

Companies can also be prosecuted for breaking health and safety laws.

The ORR is still investigating this latest case so we do not yet know whether it will take any action.

There is also some history between Network Rail and the company involved.

Image copyright PA Image caption There was a series of bad accidents on Britain's railways in the 1990s and early 2000s

Look at this line from a letter signed by Network Rail's director of freight, Paul McMahon, and addressed to the WCR company secretary: "You are aware that Network Rail has had concerns about WCR's performance of its Safety Obligations for some time and recent events lead Network Rail to believe that the operations of WCR are a threat to the safe operation of the railway."

That hostile view has now been toned down.

"I can confirm that as you have now satisfactorily addressed all of the actions we set out in our Suspension Notice of 1 April we will lift the suspension of your Track Access Contracts," said Mr McMahon subsequently.

"We welcome the commitment West Coast Railways has made to improving safety management," he added.

The boss of Britain's train drivers' union, Mick Whelan at Aslef, told me he wants better regulation of the crews in charge of the steam charters that crisscross the country.

Without knowing exactly what happened at Wootton Bassett, he said there is a wider issue in this "more casualised part of the industry", regulating the "people who may have retired but who like driving trains".

After a series of horrific accidents in the late 1990s and early 2000s, Britain now has the safest trains in Europe.

Lapses like this threaten that enviable record.