The UK Government had already agreed to fully fund electrification of the line from London Paddington as far as Cardiff, and then from Bridgend to Swansea – but not the stretch in between – at a cost of £850m.

Mr Crabb and First Minister Carwyn Jones have both said resolving the row is a top priority after Mr Crabb replaced David Jones in the reshuffle earlier this month.

But the RMT said the the ongoing dispute threatened to derail the entire project, after political and business figures called into question David Cameron’s commitment to electrifying the line all the way to Swansea.

Original plans would see the line to Cardiff electrified by 2017, extended to Swansea by 2018, with the Valleys network completed between 2019 and 2024.

The acting general secretary of the RMT, Mick Cash, said “disgraceful political jockeying” over the plans had put those target dates at risk and mirrored the “complete contempt currently being shown for rail services in the north by the government and reinforces the suspicion that the limited number of current rail infrastructure projects are being cherry-picked to favour the Tory-voting heartlands”.

Mr Cash said: “It is deeply damaging that essential rail modernisation plans are being jeopardised by a row between Cardiff and London over financing when as far as staff and passengers are concerned these issues should have been put to bed right from the outset.

“This chaotic situation is part and parcel of the fragmentation and lack of strategic planning at the heart of rail policy after two decades of privatisation.”

“RMT is sick of the political point-scoring that is going on here, we are also well aware of the interview with David Cameron himself in which he confirmed that the works would be funded centrally.

“This scenario has echoes of the electrification scheme in the north, due to be completed in 2018, where senior Government officials have been unable to give assurances to the transport select committee that those works would be funded.

“The trail on all of this goes right to the heart of the Westminster government who seem to be prepared to renege on commitments to rail improvements and modernisation at the drop of a hat.

“RMT will work with local communities to end the posturing and point-scoring and to deliver the modern, high-quality rail services that our passengers deserve.”

Secretary of State for Wales Stephen Crabb with Wales Office ministers Alun Cairns and Baroness Randerson

Secretary of State for Wales, Stephen Crabb, there had been two meetings with Carwyn Jones since his appointment on electrification, but said he “wanted it sort out” and that it had “dragged on too long”, adding the business community was expecting “leadership” from him on the issue.

“The fact is that you have this difficult, technical engineering project and it’s an expensive project as well,” he said. “You’re talking about two components of it, one is the electrification of the Great West Mainline through to Swansea the other part of the project is electrification of the Valleys lines.

“I’m clear is that what I would like to see as Secretary of State is for both elements of the project to go ahead, that’s the First Minister’s intention as well. We’re starting from a good base of understanding where each other are coming from.

“Following that meeting I’ve met with the Secretary of State for Transport in the UK Government Patrick McLoughlin to talk about this. It is the number one issue in my in-tray at the moment.

“We’re not in a position to say what the outcome of the discussions will be, but I’m hopeful that we can see some early progress on resolving this particularly difficult and knotty problem.”

A Welsh Government spokesman said: “We are involved in ongoing discussions with the UK government regarding rail electrification in Wales.”