Rail passengers are being warned to expect disruption as major engineering work takes place in Edinburgh.
Network Rail is renewing four sets of points and replacing 250m of track at Haymarket East junction, to the west of the station.
Many services will be affected as the junction is one Scotland's busiest, used by up to 30 trains an hour.
No trains will be able to pass through Haymarket and replacement buses will operate into Waverley from the west.
Normal services are due to resume on all routes from 10:00 on Sunday.
The upgrade is aimed at improving the reliability of the track but requires several days of work.
It has been scheduled for the holiday period to minimise disruption, as there were no ScotRail services into Edinburgh on Christmas Day or Boxing Day.
ScotRail is urging customers to consider making alternative arrangements as the work continues into Friday and Saturday.
Many services will terminate before reaching Edinburgh, with only limited replacement transport available. Details of affected services are available at the ScotRail website.
Liam Sumpter, Network Rail Scotland route director, said: "Haymarket East junction is a key part of Scotland's Railway and is used by hundreds of trains a day travelling to destinations across Scotland and England.
"We understand the inconvenience this work will cause to some passengers, but renewing such a complex piece of our railway cannot be accomplished without a short-term closure of the line.
"Our engineers have carefully planned this project to be completed as quickly as possible and we are working hard alongside our train operators to keep passengers informed of the changes to services during this important investment in the railway."
Nick King, spokesman for Network Rail, told the BBC's Good Morning Scotland radio programme: "So far work is progressing very well so we are expecting the job to be completed as planned as engineers are working around the clock."
Efforts to improve the line in Glasgow took place on Christmas Day and Boxing Day with engineers renewing 300m of track at Shields Road.
In Lanarkshire a signalling upgrade was taking place, with control of the West Coast mainline signals transferred from Motherwell to the new £200m West of Scotland Signalling Centre in Glasgow.