A £5m project to upgrade a rural railway linking Wales with England has been completed.
Network Rail has signalled the end of work to replace passing loops along the Heart of Wales line.
The 120-mile (193km) route travels through unspoiled and remote parts of mid and south west Wales.
Watchdog Passenger Focus welcomed the upgrade which it is hoped will safeguard the infrastructure for at least 30 years.
Five passing loops have been reinstated along the 142-year-old line at Knighton, Llandrindod Wells and Llanwrtyd Wells in Powys, and at Llandovery and Llandeilo in Carmarthenshire.
Similar work is also being carried out at Ystrad Rhondda in Rhondda Cynon Taf, and Tenby in Pembrokeshire.
In addition, the line can now provide a more "robust" diversionary route for freight and passenger trains between Swansea and Bridgend.
Mark Langman, Network Rail's area general manager for Wales, said: "The Heart of Wales line is one of the most scenic routes in Wales and it draws thousands every year - linking nearly 30 rural towns and is a popular rail journey among tourists.
"As the railway continues to grow, we will need to create flexibility on the railway and more importantly, room to cater to future demand.
"This scheme underscores our commitment and the importance to invest in the future of our railway."
Ben Davies, stakeholder liaison manager for Arriva Trains Wales, said: "It will allow us to continue to provide our customers with the high levels of service, reliability and punctuality they deserve."
Simon Pickering, Wales manager for Passenger Focus, the UK rail consumer watchdog, said the changes would mean more punctual trains.
He said: "One thing they don't mention is the National Transport Plan for Wales which is a commitment to looking at the feasibility of additional services on the Heart of Wales line.
"Passengers are clearly very interested in the outcomes of that work to see if service levels can be increased in the future."