Dunedin Mayor Jules Radich said city councillors had decided the track between Wingatui and Middlemarch should be maintained, rather than "let go".
Various options would now be explored.
"It’s an exciting development for the future of Dunedin’s tourism industry," Mr Radich said.
Dunedin City Council chief executive Sandy Graham said the council had committed "in principle" to retaining the Taieri Gorge train service.
The decision meant the focus would now shift to considering the best options to secure and enhance the Taieri Gorge experience, she said.
"This will include potential new operating models for both the service and its maintenance requirements, as well as options to enhance the journey through the gorge itself," Ms Graham said.
"The Taieri Gorge remains one of the world’s great train journeys and this is an important step towards securing its future."
The city council’s decision was disclosed yesterday, after there had been discussion in the public-excluded part of Tuesday’s council meeting.
It has yet to be decided how upkeep of the line might be paid for or what the operating model for Dunedin rail services should be.
Trains have in recent times run only as far as Hindon and maintenance on parts of the line have been either deferred or kept to limited levels.
Maintenance was the responsibility of council-owned Dunedin Railways but, even before the Covid-19 pandemic, the company battled to keep on top of it at the same time as breaking even.
Previously the operation had effectively been losing $1.5 million a year — even in good years — because of deferred maintenance, Cr Lee Vandervis said.
Dunedin Railways was placed in hibernation in 2020 in response to disruption caused by Covid-19 and limited services have since been run under Dunedin City Holdings Ltd (DCHL).
DCHL chairman Keith Cooper said in 2020 Dunedin Railways had a deferred maintenance bill in the order of $10 million for the Taieri Gorge track in the longer term.
More is expected to be known about how Dunedin rail services might be run in the future when the council’s 2024-34 long-term plan is considered.
Mr Radich said Dunedin had "the most magnificent railway station in the southern hemisphere" and having passenger trains using it breathed life into the heritage building.
Former Taieri Gorge Railway Ltd chairman John Farry, who was prominent in a fundraising campaign in 1990 to save the tourist train when its future was uncertain, welcomed the city council’s latest move.
Working out how sufficient maintenance might best be facilitated would now be key, he said.
Otago Excursion Train Trust chairman Murray Schofield said last year $10million across 10 years should be enough money for the upkeep of the full Taieri Gorge railway line.
The trust wants to help restore services on the line between Dunedin and Middlemarch.