Electronic warning signs alerting lorry drivers to the notorious Kingway Bridge, near Corston, will be installed by the end of the month.

The railway bridge is the second most struck in the country, behind Barrowby Road in Grantham, Lincolnshire.

On Saturday afternoon, a lorry driver was taken to hospital suffering from shock after his HGV crashed into the bridge and overturned.

The A429 was closed for several hours as a result and delays were also caused to train services.

As a result of frequent incidents at the bridge, Network Rail has agreed to fund two sets of warning signs, along with Wiltshire County Council.

They will be placed either side of the bridge, at Corston and Stanton St Quintin.

Sensors will measure the height of vehicles driving on the road and, if they are too big to pass underneath, warning signs will flash telling the driver not to proceed.

County councillor John Thomson said: "Ever since I took over as a county councillor I have been pushing the highways people to discuss the problem with Network Rail.

"They had some money left over at the end of their financial year and they came to us and said if we put a project together quickly that we could have the money.

"Our officers really got their skates on and put forward a project, which Network Rail was happy with."

Bernard Ingham, chairman of Corston Parish Council, said he was pleased at the news.

"For many years now we have been campaigning to get something done," he said.

"Whenever we have tried, everybody has said it is someone else's responsibility.

"Thankfully, Network Rail have found some money to do it.

"It costs them quite a bit whenever it happens, because they have to send someone out to do a structural and security check. Putting in an electronic sensor is something we have been suggesting for the last five years.

"It causes problems when people get diverted through the little villages too, because the grass verges get all torn up, so it is welcome on that front as well."

A Network Rail spokesman said: "The costs of a vehicle hitting a bridge are significant.

"Not only do they cause disruption to both road and rail users, but they can also lead to serious consequences, from buckling the railway track, to causing the derailment of an oncoming train.

"We urge drivers to understand how tall their vehicles are before they go under rail bridges."