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 ›
One lane is closed and there's slow traffic because of a spilled load of hay on the M4 Westbound between J30 A4232 (Cardiff Gate) and J32 A470 / A4054 (Coryton Interchange).
One lane is blocked and there's queueing traffic after an accident on the M4 Eastbound between J27 B4591 (Highcross) and J26 A4051 (Malpas Road).
There are calls for motorists in Wales to take more care when getting behind the wheel following the release of figures which show careless drivers or speeders in the country are fined every ten minutes.
The calls come at the start of Road Safety Week, with driving charity Brake launching a campaign for more people to look out for each other on the road.
The figures also show that 41% of primary school children in the UK say they have been hit or nearly hit by a vehicle while on foot or on a bike.
When drivers use roads without care for others the consequences can be tragic and horrific - people killed and badly injured, lives ruined forever, because of a moment of impatience or selfishness.
There's queueing traffic after an accident, now on the hard shoulder, on the M4 Eastbound between J27 B4591 (Highcross) and J26 A4051 (Malpas Road).
There's congestion to J30 A4232 (Cardiff Gate) and on the A48(M) to J29a A48 Eastern Avenue (St Mellons). All lanes have been re-opened.