A London-based internet security expert has warned a new hi-tech railway signalling system could be hijacked by terrorists and used to cause a crash.

The European Rail Traffic Management System, a new digital system that could be operational in this country by the 2020s, is aimed at making lines safer but could be vulnerable to cyber attack, according to government adviser Professor David Stupples.

The City University expert told the BBC the system could be exposed to malicious software, or malware, used to cause a "nasty accident".

He said government ministers feared the possible threat of hacking and the biggest could come from an insider.

He told the broadcaster: "It's the clever malware that actually alters the way the train will respond. So, it will perhaps tell the system the train is slowing down, when it's speeding up."

"Governments aren't complacent. Certain ministers know this is absolutely possible and they are worried about it. Safeguards are going in, in secret, but it's always possible to get around them.

"The weakness is getting malware into the system by employees. Either because they are dissatisfied or being bribed or coerced."

Network Rail, in charge of the upgrade, said it acknowledged the threat.

A spokesman said: “We know that the risk (of a cyber attack) will increase as we continue to roll out digital technology across the network.

"We work closely with government, the security services, our partners and suppliers in the rail industry and external cyber-security specialists to understand the threat to our systems and make sure we have the right controls in place."