The business has been sold to German firm Knorr-Bremse Rail Systems.
Administrators BDO said the 202 jobs left at the sites in Glasgow and Milton Keynes were secure and outstanding salaries will be paid for the month of July.
The firm went into administration in July with the company facing short term cash flow problems, despite a healthy future order book.
One third of the staff were made redundant across both sites with the loss off 33 jobs in the Springburn depot,
It is the last remaining railway firm on the historic 'Caley' works at St Rollox, where once thousands were employed building and maintaining locomotives. The remaining staff went without pay until they were paid for 10 days work in August, but July's wages were still unpaid.
The administrators said all back wages will now be paid by the new owners. Bryan Jackson, BDO business restructuring practitioner, said:"We are delighted with this very positive outcome for the business, employees and more broadly for the communities of Wolverton and Springburn, both of which have strong railways heritage.
"This outcome has only been possible because of the support of customers and the dedication of staff, and we are grateful for this cooperation throughout the administration."
Talks had taken place involving MPs, MSPs, unions and government officials from both Westminster and Holyrood over the last two months while a buyer was sought.
Patricia Ferguson, Maryhill and Springburn MSP, said the focus now must be on ensuring the jobs can be sustained in their current locations in the long term.
She said: "This ends weeks of uncertainty for the skilled staff of the company and hopefully means that they will have a stable future.
"Clearly we need to look at the deal that has been done to ensure that it is sustainable and can support the continuation of engineering works at both sites."
She said it was unfortunate the deal was too late for those who had lost their jobs and called on the Scottish Government to ensure they were helped to find new work.
The Scottish Government said it was already assisting staff who lost their jobs.
John Swinney, Finance Secretary, said: "Through our Partnership Action for Continuing Employment (PACE) initiative, we have supported Railcare staff who lost their jobs since the company went into administration. "