The Unite union has said 147 jobs are under threat at a rail company's manufacturing site near Edinburgh.
Progress Rail Services makes high integrity steel castings at its steel foundry in South Queensferry.
The redundancies are expected to start in November before the site is shut at the end of the year, Unite said.
Progress Rail Services said it was notified that Network Rail intended to award a significant infrastructure contract to other suppliers.
In statement. it said the award constituted "the majority of the volume Progress Rail has historically received from Network Rail".
The company, which has sites across the UK, said it had supplied the UK rail industry with critical track materials for more than 160 years.
"As Network Rail's largest supplier of track components, Progress Rail is challenging the award and has notified its employees," the statement said.
"Due to the potential impact of Network Rail's tender outcome, Progress Rail has opened a collective consultation with employee representatives at each of its UK trackwork locations to discuss possible redundancies and efforts to mitigate potential impacts, although no formal decisions have been made at this time."
Unite industrial officer, Graeme Turnbull, said the job loses would be a "massive blow" to Scottish manufacturing.
The union said Progress Rail Services had been affected by Network Rail awarding contracts overseas.
Network Rail said it had yet to award its new track switches and crossings contracts, adding that it had "approached its current suppliers with the indicative outcome of its tender and bidding process".
A spokesman said: "Progress Rail currently has a full workload from Network Rail for at least another six months and we continue to work with them, and their US owning company Caterpillar, to manage current orders which they have accepted and are contracted to complete."