An investigation into why trains continued to pass over a railway viaduct damaged by storms found a safety system for more than 100 at-risk bridges in Scotland had lapsed.

The Rail Accident Investigation Branch (RAIB) launched an investigation into the Lamington viaduct on the West Coast Main Line near Lockerbie, Dumfries and Galloway, after it was severely damaged by flood waters during Storm Frank in December 2015.

Trains continued to cross the damaged line - a key route between Scotland and England - after a driver reported a "rough ride" and investigators found the viaduct had been identified as vulnerable to water damage a decade before the incident.

A driver reported a defect on the track on the morning of December 31 and trains were told to cross at low speed while a maintenance team from track operators Network Rail was sent to the site.

The team found "no significant track defects" and the speed restriction was lifted, but when the 5.57am Crewe to Glasgow service passed through at about 110mph they noticed "large track movements" and immediately put a speed restriction in place.

They noticed the bridge's central pier was damaged by scour - removal of the riverbed beneath the bridge foundation - and closed the line.

A stone had fallen out of the pier and there were large cracks above the gap, and divers later found a hole one metre deep under the foundations.

Investigators found the bridge was on a list of vulnerable structures which needed special precautions during floods, including monitoring river levels and closing the line if the water reached a certain level.

An RAIB report stated: "However, this process was no longer in use and there was no effective scour risk mitigation for over 100 of the most vulnerable structures across Scotland.

"This had occurred, in part, because organisational changes within Network Rail had led to the loss of knowledge and ownership of some structures issues."

The bridge was closed for more than seven weeks as major engineering works took place.

Simon French, Chief Inspector of Rail Accidents, said: "It is of particular concern to me that the vulnerability of this structure to scour had been identified at least 10 years previously.

"Despite this, insufficient action had been taken to protect the piers from scour or to monitor the integrity of the viaduct at times of high water flow.

"The continued operation of trains over this high-risk structure, despite a previous report from a driver of a rough ride, provides vivid evidence that the risk of scour was not generally appreciated by those involved.

"Of even more concern was our finding that there were no effective scour mitigation measures in place for over 100 of the most vulnerable structures across Scotland.

"We discovered that a previous process for managing scour risk on Scotland route had fallen into disuse, at least in part due to organisational change, and that this had not been recognised by Network Rail."

The RAIB asked Network Rail to take action on the management of scour risk, the response to defect reports affecting structures over water and the management of control-centre procedures.

A Network Rail spokesman said: "We worked closely with RAIB as it completed this report and will carefully review the findings.

"The safety of passengers, and rail workers, is of vital importance to Network Rail and we have already made significant changes to our management and maintenance of scour-risk structures in Scotland since Lamington.

"We have invested over £3 million so far this year to reduce scour-risk at high priority structures and have carried out 277 specialist underwater examinations to assess the foundations of bridges ahead of this winter.

"We have also identified 50 bridge sites where we will roll-out telemetry equipment, to help monitor the impact of flooding on the network and to improve early identification of potential issues."