Track laying along the 30-mile route of the Borders to Edinburgh railway has crossed into the Scottish Borders.
It marks the completion of the rail installation process in Midlothian.Track is now in place over a number of landmark structures including the Lothianbridge Viaduct near Newtongrange and the new Hardengreen Bridge.
Network Rail project director Hugh Wark said that reaching the Scottish Borders was a "significant day". Trains are due to return to the route next September.
Now that the rail is in place throughout Midlothian, it is being used to transport engineering vehicles.
The first vehicles to use the railway are specialist trains involved in completing the track laying process, installing ballast and undertaking "tamping" - packing the ballast under the rail and sleepers.
The rail installation machine will now continue its journey south through the Scottish Borders and is scheduled to reach Tweedbank towards the end of December.
Mr Wark said: "This is a significant day, both for the Scottish Borders, which is seeing the rails extending into its boundaries for the first time in 45 years, and for Midlothian, with rail installation now completed through the area.
"Significantly, we've also reached the highest point of the route at Falahill Summit."
Scottish Borders Council leader David Parker said the arrival of the track-laying vehicles brought the return of rail services to the region one step closer.
"Seeing the rails enter the Scottish Borders brings home the reality that trains will be running along the railway next September," he said.
"The Scottish Borders is just months away from reaping the benefits of this investment that will encourage more visitors to our many attractions as well as boost the economic health of our towns and villages."