The rail workers' union, the RMT, has said it is "appalled" about plans which it claims will lead to a £5bn privatisation of the Welsh railway.
It insisted a decision had been taken to privatise the work carried out by Network Rail, which is responsible for railway tracks and infrastructure.
It has written to the first minister to call for the plans to be halted.
But the Welsh Government said it had "absolutely no plan to privatise any part of the Welsh railway network".
The union claimed privatisation would start with the forthcoming South Wales Metro upgrade project - which promises better trains, faster buses and light rail or tram services in Cardiff and the south Wales valleys.
Four companies have been shortlisted to run the metro and also take over the Wales and Borders franchise, currently run by Arriva Trains Wales.
A contract will be awarded in early 2018.
But the RMT said it had now emerged the winning bidder would also take over the maintenance of the railway's infrastructure from the publicly-run Network Rail.
General Secretary Mick Cash claimed Network Rail staff would also be transferred to the new operator.
In a letter to First Minister Carwyn Jones he said the privatisation plans for the South Wales Valleys lines became clear following a meeting with Transport for Wales (TfW) on 25 July.
"The meeting was a sham as it was blatantly obvious to me that a decision had already been taken to give the private sector the South Wales Valley lines," he wrote, adding that the RMT was "appalled and angry".
Speaking on Radio Wales' Good Morning Wales programme, Mr Cash said he was "amazed" at the Welsh Government's denials over the plans.
He said Network Rail would "lose responsibility for the South Wales Valley lines completely - lock stock and barrel going over to the new operator, who will be a private sector operator".
He added: "Our members are being transferred from the publicly-run Network Rail to the privately owned bidders for the franchises. Who incidentally will either be the French, German, Chinese or the Dutch government."
But the Welsh Government said no part of the Welsh railway network would be privatised.
"In taking forward our ambitious plans for the new rail franchise and the South Wales Metro, we will bring the core valleys lines under the direct ownership and control of the Welsh Government, and while we will work with the operator to run services and maintain the track on those lines, the railway infrastructure will remain in public sector ownership," a spokesman said.
"Ultimately this is about bringing together track and trains in Wales for the benefit of passengers, with safety as our number one concern.
"Our approach will provide passengers with enhanced services, better quality trains and a vastly improved travelling experience and ensures that a better deal for passengers can be delivered."