The joint administrators of Llangollen Railway PLC, which had the right to run the railway but went bust in March, have sold the business and some of its assets to Llangollen Railway Trust Limited for an undisclosed amount.
The Railway Trust had been putting together plans to buy the business from administrators after the PLC was forced to go into liquidation with the company insolvent to the extent of £350,000. Of this £250,000 was related to engineering contract disputes.
Administrators announced on Wednesday that a deal had been reached that ensured the future of the Llangollen to Corwen railway.
The deal does not include any of the PLC's rolling stock, like the railway's famous coaches which are being auctioned off with starting prices of £12,000. But the Railway Trust said that obtaining the right to use the railway line was the first key step towards recovery.
"We can now turn, fully to the task of preparing for reopening as we continue on our journey to protect and preserve this beautiful part of our heritage," a spokesman said.
Alan Coleman, one of the joint administrators together with Jason Elliot at Cowgills Holloway Business Recovery, said: “The sale has secured the future of this superb heritage railway which is a key attraction to the local area and has provided the best outcome for creditors.
"We always try and achieve the best outcome financially for the business and to preserve as many jobs as possible and we are extremely pleased to be able to ensure the future of this much-loved local attraction."
Meanwhile the Railway Trust is continuing to raise funds to buy the coaches, plants and machinery which are due to be auctioned by Lambert Smith Hampton in May and volunteers are continuing to help get the site ready for when it can reopen.
The trust already owns the locomotives and some rolling stock, while the land and trackbed are owned by the local council.
Talks are also taking place between the trust and Welsh Government, Business Wales, Denbighshire County Council and the National Heritage Lottery Fund over the railway's funding.