Poole High Street level crossing repairs under way
A "high-risk" and busy level crossing is being closed so that a £1m works scheme can go ahead.
The crossing through Poole's High Street is used daily by 20,000 people.
It has been described by Network Rail as one of its most high-risk crossings because of the way people regularly slip by the barriers after they close.
But the work by Network Rail and South West Trains Alliance centres around replacing worn-out track through Poole station and around the crossing.
Infrastructure director John Halsall said: "Renewing old track is one of the most important ways we can make our railway safer and more reliable.
"It's a big job and unfortunately we will have to close the level crossing in Poole while the track over it is replaced."
He said there was no way to keep the crossing open while the work was done.
"We appreciate that the diversion will mean people who are unable to use the bridge will face a longer journey and we apologise for the inconvenience," he said.
The crossing will also be closed to vehicles.
The work is taking place on Sunday and on 7 and 8 March.