The contract staff and a controller of site safety employed by Network Rail were packing ballast under sleepers on the line on a small bridge last month.
A lookout operated warning system (LOWS) was being used because the gang’s view was restricted by curvature of the line.
This system is designed to allow lookouts to signal the approach of a train with visual and audible warnings.
On the afternoon of the near-miss, the LOWS equipment was being operated by two Network Rail lookouts.
The lookout watching for trains on the up line was located 780 metres from the site of work, in a position which gave him a good view of trains approaching from the north.
An Edinburgh to Manchester Airport service approached the site from the north but the group were provided with no advance warning and were forced to take immediate evasive action when the train first became visible – four seconds before it reached them.
Some staff were unable to reach a safe position and pressed themselves against the bridge parapet as the train passed at an estimated 80 mph.
The incident is now part of an ongoing probe by the Rail Accident Investigation Branch.