Dozens of road bridges may have to be rebuilt or modified in the next few years to prepare them for the electrification of one of Wales’ most crucial rail links.

In some places along the Great Western Main Line, the direct route over the railway could be severed for two months or more, causing disruption to residents, businesses and farmers.

Councils, which own many of the bridges over railways, may need to organise traffic diversions but Network Rail, which owns the rail infrastructure, promises they will not be left out of pocket.

Network Rail also says it will minimise disruption to the public. At one Great Western bridge in Berkshire, it recently provided a free minibus to ferry people from one side of the track to the other while reconstruction took place.

Rail journeys in South Wales will also be disrupted at times, to allow engineers to modify bridges or the tracks beneath.

The main line from London to Cardiff is due to be electrified by 2017, followed by Cardiff to Swansea and the Valley Lines.

Trains will receive electricity from a cable above each track, but many bridges carrying roads over railways are too low to provide enough clearance for the cables. Even relatively new road bridges could be too low, because electrification was not considered a viable option until the last year or two.

The extra clearance can be gained by excavating ground beneath the tracks at some locations, but at many other bridges the decks will have to be raised. This may involve diverting pipes and cables which run under the road, followed by construction of a new deck and reconnecting the road and utilities.

New safety features will be needed at some bridges to prevent children electrocuting themselves by dangling objects near the 25,000 Volt electricity supply – strong enough to leap like lightning across a gap. Rebuilding parapets, the walls flanking the road, can often be achieved with traffic lights and half the road open to vehicles, rather than road closures.

Ciarán Scanlon, of Network Rail’s national electrification programme, said: “Rail electrification in South Wales will not cost council tax payers anything.

“Network Rail will indeed have to alter some bridges and other infrastructure, and this may involve some minor traffic diversions and other disruption. We try to keep this to an absolute minimum and would certainly not ask local authorities to pay for work which we are causing.

“However, we have found that some local authorities are taking the opportunity to improve their bridges as part of our works by widening them or by adding pavements or cycle lanes, for example. When we carry out this kind of work we ask the local authority to provide the additional funding required.”

Bridges on Welsh Government trunk roads, such as the M4 and A470, could also be affected.

A Welsh Government spokesperson said: “A number of structures in Wales require modification for the electrification of the Great Western Main Line to Swansea and the Valley Lines network. Network Rail will meet the full cost of the works required on a like-for-like basis.”

Keith Jones, director of the Institution of Civil Engineers Wales Cymru, said the current diesel trains needed no more clearance than a safety margin, but electric trains would need space for overhead cables. Lowering the track would be impractical where it would undermine the bridge’s foundations or cause drainage problems.

The alternative was extending the abutments upwards, to raise the deck height.

“That will involve aligning the highway on either side to the new deck,” he said.

“The parapets need to be raised. We don’t want children dangling over and watching the sparks. Safety is the number one priority.”

Whatever the scale of the temporary disruption, the end result would be worth it, he said.

“The benefit to Wales in total from electrification is wonderful. South Wales becomes nearer and nearer to London, and all that goes with it. Companies relocating aren’t likely to just stay in Bristol. They’ll see we’ve got these modern links into Wales.”

He said Valleys residents would benefit from modern trains and faster journeys to Cardiff.

Users of local roads could benefit from many of the bridge works because the new structures would meet modern standards.

“Some of the bridges may have weight limits on them now, as well as perhaps bad alignments,” said Mr Jones. A new deck could be wider than its predecessor, or re-aligned to eradicate an awkward bend on the approach to the bridge.

Network Rail started rebuilding bridges for the Great Western electrification programme last spring, focusing on 10 bridges in west Berkshire.

It provided a free minibus service between Aldermaston Wharf and bus routes on the opposite side of the tracks, while two bridges over the railway were rebuilt. The work was due to take six weeks but took six months, after structural problems were discovered. Some businesses say they lost money as a result, and Network Rail has invited them to submit compensation claims.