An investigation was launched after a photo surfaced of a “staggeringly dangerous” temporary road layout at a level crossing.

Posted on Twitter by @Railraptor, the image showed a temporary traffic light immediately after a level crossing on Black Bank Road, near Ely.

County councillor Lorna Dupre agreed that “this could easily have been a fatality”.

Cambridgeshire County Council said its highways contractor Skanska was carrying out work in the area.

The company said it is “investigating a report related to our traffic management at Black Bank that does not appear to have met our high standards”.

The picture was posted with the words “What could go wrong?”

It prompted astonished and angry reactions, and was described as “a staggeringly dangerous situation”.

One Twitter user said: “The unavoidable fact here is that this could very easily have caused a fatal collision between a train and a road vehicle.”

A spokesperson for Skanska said: “The traffic management was removed and the site made safe as soon as we were aware of the issue.

“Health and safety are our top priority.”

A county council spokesperson said: “We are awaiting the outcome of the investigation”.