Leven bridge repairs that will see traffic diverted for a year have been approved by councillors.
The £8.15 million of work to strengthen the Bawbee Bridge means the only direct route between Leven and Methil will close.
And the 18,000 vehicles that use it every day will either have to use a temporary bridge across the River Leven or face a five-mile diversion.
Fife Council has now agreed to the new bridge near the swimming pool.
But while the money is in place, it still needs to get planning approval.
The new route will take traffic past Bayview Stadium and on to South Street, Methil, via a new roundabout.
Meanwhile, councillors have moved to allay fears the major works could delay the opening of the long-awaited Levenmouth rail link.
The council’s Labour leader David Ross said: “I don’t anticipate there will be any delays in opening the railway.”
Bawbee Bridge is in a ‘deteriorating, poor condition’
The 75-year-old Bawbee Bridge spans the River Leven, as well as the route of the new rail link.
And it needs extensive work, including higher parapets to ensure trains can travel safely beneath it.
It also needs a new, stronger deck to accommodate the amount of traffic that crosses daily.
Roads and transportation manager John Mitchell said doing nothing was not an option.
And he warned delaying until after the railway was in place would double the cost.
“There’s a real, long-standing issue with this bridge,” he said. “It is in a deteriorating, poor condition.”
The work will be incorporated into the rail link project and will involve Transport Scotland and Network Rail.
Assurances over Levenmouth rail link opening
Liberal Democrat councillor Tim Brett asked for reassurances over timings following concerns from rail campaigners.
“We’re due to have the railway operating by December 2023, under two years away.
“And this project is going to take in excess of a year.”
Mr Mitchell responded: “The whole point is to integrate the project and have it delivered before the railway.”
And the council’s SNP leader David Alexander added: “As far as I’m concerned, this is a very, very positive outcome.”
Further assurances were given that the Bawbee Bridge work would not delay repairs to other bridges across Fife.