Two railway workers were killed on Wednesday after a passing train hit them between Port Talbot and Bridgend in South Wales.
British Transport Police (BTP) said there was a third rail worker who is uninjured but is being treated for shock.
Andy Morgan a BTP Superintendent said, “We are making a number of urgent inquiries to understand exactly what happened in the moments leading to this fatal collision.
“Very sadly two people have died, and my officers are now working to identify them and ensure that their families are supported at this incredibly difficult time.”
Manuel Cortes, Transport Salaried Staffs’ Association general secretary said, “It’s too early to speculate about what has happened here but clearly something has gone badly wrong.
“There must now be a full investigation because it is simply not acceptable that in the 21st century people go out to work and end up losing their lives.
“Our Network Rail members together with everyone else at the company do so much to keep our railways running smoothly. They must be able to do this in a safe environment.
“Safety on our railways is paramount and sadly, as today’s tragic events show, it can never be taken for granted.”
Mick Cash, general secretary of the Rail, Maritime and Transport (RMT) union said, “This is shocking news. RMT is attempting to establish the full facts but our immediate reaction is that this is an appalling tragedy and that no-one working on the railway should be placed in the situation that has resulted in the deaths that have been reported this morning.
“As well as demanding answers from Network Rail and a suspension of all similar works until the facts are established, the union will be supporting, our members and their families at this time.
“Our thoughts are with those involved in this incident and their loved ones.”
Constituency MP Stephen Kinnock said on Twitter, “I’m very concerned to see reports of the tragic accident on the rail line between Bridgend and Port Talbot.
“This is awful news, and my thoughts are with the families of all concerned.”
A spokesman for the Rail Accident Investigation Branch (RAIB) said, “Two inspectors are now travelling to the site to gather evidence.”