David Cameron was shown the busiest section of railway in Wales, near Cardiff Central station, where the electrification of the Great Western main line and the Valleys lines will intersect.
The Prime Minister was shown round by Mark Langman of Network Rail Wales.
The Welsh Liberal Democrats say the decision to hand control of the Wales and borders rail franchise to the Welsh Government demonstrates their influence in the Westminster coalition. But Plaid Cymru say the railway track itself should have been brought under Welsh control.
Today's announcement is a landmark as it means decisions on Welsh train services will now be made in Wales. The fact that this power closer to the people of Wales shows just how strong the Liberal Democrat influence is in the Wales Office.
Until now, the Governments at either end of the M4 have been able to pass the buck between them over who is to blame when things go wrong. Now we will know absolutely where responsibility lies for making improvements to services and giving Wales the trains it deserves.
The Welsh Government have less than four years to decide what all of Wales needs now and in the future, run a franchise competition, select an operator and then ensure they have the trains they need to deliver decent services. This will be no mean feat, but with matters resolved and commuters knowing where to look for answers, our rail services will be properly accountable at last.
Eluned Parrott also said she was "absolutely delighted" that the Welsh and UK Governments had resolved the funding of Valleys lines electrification. Plaid Cymru's spokesperson, Rhun ap Iorwerth also welcomed it as a "good step in the right direction" but said his party would continue to argue for complete Welsh control of the railway.
Plaid Cymru welcomes the devolution of the rail franchise. For the first time, Wales will be able to choose who operates its own railway. This is something that our party has underlined the importance of for several years. The current and next Welsh Governments now have an enormous challenge in planning and delivering the next franchise, but this is a challenge that we know can be reached.
Plaid Cymru believes this must lead to more areas of the country being opened up to rail services, and that work on this must begin as soon as possible.
Previous Secretaries of State appeared to want Wales to pay the full cost of Valley Lines electrification. They have rowed back on this and have reached a deal. The deal itself is a good step in the right direction but it still appears to leave control of rail infrastructure in the hands of Westminster. We would prefer to see both franchising and infrastructure in Welsh hands so that they can be planned together, and will continue to press on that issue.
The Welsh Conservatives have blamed a lack of attention to detail by Labour ministers when Valleys rail electrification was first announced for the row over money that put the entire project at risk. Originally the UK government expected the entire £460 million cost to be repaid by the Welsh Government, primarily by increasing train fares.
Under the new deal announced today the UK Government will contribute £230 million to the scheme, though the rest of the money will still have to be repaid.
This deal will have a hugely beneficial impact on the lives of tens of thousands. It is a massively important investment that puts Wales first, prioritises infrastructure and transport, and provides a hugely welcome boost for business.
Labour didn't electrify an inch of rail track – and their mistakes and lack of attention to detail led to the circumstances preceding today’s solution. In stark contrast - this announcement is the real action Wales needs.
I wholeheartedly welcome the hard work of Conservatives in Wales in securing a pivotal and life-changing deal for our communities. From Newport to Swansea and - crucially, into the Valleys - this is what the region needs to secure growth and move forward.
Network Rail say the go-ahead for rail electrification in the Valleys will mean a better train service and boost the Welsh economy.
Electrification will transform the railway in south Wales, making journeys faster, more reliable, greener and quieter. An electrified railway will also help support economic growth by creating jobs and boosting the supply chain when work is undertaken, as well as providing a building block for future growth. It will help reduce journey times and boost commuting opportunities, making Wales a better place to do business.
Arriva Trains Wales has responded to today's announcement that the UK Government will pay £230 million towards electrifying the Valley Lines.
Electrification will bring many benefits including quicker journey times, reduced running costs, lower carbon emissions and the replacement of the current rolling stock on this part of the network which is nearing forty years old.
This important investment builds on the huge growth we have already seen in Wales over the past 10 years and is a great recognition of the importance of rail services in Wales.
The UK Govt has today agreed to pay £230 million -half the estimated total cost- towards electrifying the Valleys lines.Read the full story ›
The organisations which make up the NHS in Wales say they are "pleased" that the uncertainty surrounding a pay dispute between workers and the Welsh Government has been "removed", and strike action has been avoided.
We welcome the decision by our TU partners to accept this pay deal. We are pleased that the uncertainty surrounding this issue has now been removed and further strike action, which would have caused considerable disruption to services, will now be avoided.
Throughout this whole process discussions have been positive and constructive on both sides. We now look forward to working with our trade union colleagues and staff to address the considerable challenge of providing the best quality services to patients and their families against a backdrop of increasingly constrained finances.
Unions representing NHS workers in Wales have welcomed the end of a pay dispute with the Welsh Government over pay, and the agreement to a new Wales-only deal.
The Royal College of Midwives described it "a fair pay offer", while UNISON said: "this agreement does not make up for the real term loss that NHS workers have suffered in recent years, but we hope we can build on this settlement in the future."
It has taken time to get to this point and the Welsh Government has taken a sensible and practical decision to end this pay dispute.
This is a good example of how unions and the Government through meaningful negotiation can produce the right result for the staff and, the right result for the people they care for.
We have fought for and delivered a fair pay offer for our members in Wales. We can now move forward and put our energy into working together to improve maternity services in Wales.
Taking strike action is always a last resort for our members. The settlement is an improvement on the previous offer and we welcome achieving the Living Wage for our lowest paid members.
This has been a difficult process for all involved, particularly given the challenging financial climate that we are in as a result of the UK Government's continued austerity programme.
Clearly this agreement does not make up for the real term loss that NHS workers have suffered in recent years, but we hope we can build on this settlement in the future.