KiwiRail is making 80 to 90 workers at the Hillside railway workshops in Dunedin redundant after making only a partial sale of the site.
The state owned enterprise's chief executive Jim Quinn told the workers the news at a meeting on Thursday afternoon.
The company has conditionally sold part of the business, a foundry, to the Australian company Bradken but didn't receive an offer for the rest of the operation.
Mr Quinn says 18 staff will be retained at the foundry and seven to operate a 100 tonne crane but there are no guarantees the jobs at the latter facility will last longer than four years.
"I can't conjure up magic. We've been able to land what I think is a good outcome generally. In the context we just unfortunately did not get anybody who was really going to entertain the full site."
He says 12 jobs will also be offered to Hillside workers who want to transfer to KiwiRail's Woburn workshop in Lower Hutt.
The remaining staff can leave in December or in January if they want to try for other roles.
The workshops, which are 130 years old, were put on the market in May.
KiwiRail says the land will not be sold, but Bradken will lease the foundry area for five years initially.
Mr Quinn says he is pleased to be able to land a good outcome generally in the context, but is disappointed the full site could not be sold.
He says the sale is conditional on Bradken being able to find enough workers, but he doesn't think that will be a problem.
Unionists blame Government
Angry union delegates at the workshops say they blame the Government for closing most of the site down.
The secretary of the Hillside branch of the Rail and Maritime Transport Union, Les Ingram, says he is gutted the axe has fallen on 90 jobs, and ended 130 years of history.
"Hillside is more than a factory, it's a symbol of what New Zealand used to be - proud, courageous, strong, leader of the world in the 50s, 40s and 30s - and now this Government has decided we're not good enough anymore. They've exported our jobs overseas. I blame this entirely on the Key Government."
Mr Ingram says the news was much worse than he expected.