Passengers on many ScotRail routes will be able to charge their mobile phones and laptops aboard trains for the first time thanks to a £14 million overhaul of carriages.
The first of the 40 refurbished diesel trains will run on the Borders Railway, which opens to the public on Sunday.
Other improvements on the two-carriage Class 158 diesel trains include better seats which are more closely aligned with windows, and more luggage and bike space.
This is part of plans to make rail travel more appealing for tourists by maximising opportunities for panoramic views.
Lighting, carpets and toilets will also be revamped.
Scottish Government transport minister Derek Mackay said: “Fittingly, the first carriages off the production line will start their journey as part of the historic Borders Railway launch, with all the benefits that will bring for the Borders, Midlothian and Edinburgh economy.”