A group of railway workers were a single second from "major tragedy" after a near-miss involving a 125mph passenger train, a report has concluded.
Accident investigators criticised an "unsafe system of work" which broke down when a look-out and the staff's boss both failed to see or hear the train coming, despite it blasting its horn.
The Rail Accident Investigation Branch (RAIB) found the workers' team leader - an experienced employee - became "distracted" and then "forgot" that an automatic system had already sounded an alarm, warning of the approaching train.
The contractors had been uncomfortable with the way things were being done - in a bid to maximise work time on the track - but "feared" losing future jobs if they challenged the boss, employed by Network Rail.
The incident happened near a level crossing on a stretch of the East Coast Main Line in Nottinghamshire, between Mansfield and Lincoln, at 11.22am on October 5 last year.
In the report, published on Thursday, the train's driver was approaching at maximum allowed speed when he saw the workers in the distance.
Sounding his horn, he got no response, and as he continued to blast warnings it was only when the train was three seconds away he saw the workers begin to move off the tracks at Egmanton.
The driver hit the emergency brake seconds before passing the group, with the train stopping a kilometre down the line.
The report's authors said: "One of the group shouted a warning to three others who were between the running rails of the line.
"These three workers cleared the track about one second before the train passed them."
The RAIB report made three recommendations, including a shake-up of Network Rail leadership processes to cut "rule-breaking", and more effective challenging of unsafe work practices.
Simon French, chief inspector of rail accidents, said: "In this investigation, RAIB found that the person in charge had adopted an unsafe method of working, in an attempt to undertake additional unplanned work.
"Both the person in charge and team members became distracted, and the result was that three of them found themselves jumping clear of a train travelling at 125 miles per hour with just one second to spare.
"This came so close to being a major tragedy."
He added: "We are therefore recommending that Network Rail looks again at how it monitors and manages the safety leadership exercised by its staff, and how they interact with contractors.
"There have been too many near misses in recent years."