Thousands of rail commuters have been stranded after a power surge knocked out signalling, halting all trains in the south Wales network.
Power went out at about 0710 GMT at Bridgend, Barry, Cardiff and in the valleys up to Caerphilly.
Arriva Trains Wales (ATW) is trying to move about 30 trains, each carrying hundreds of passengers, to platforms.
Arriva said power was restored almost three hours later but problems would last into the afternoon.
Peter Leppard, operations director of ATW, said: "About ten past seven there was a major power surge from Western Power Distribution into Cardiff signal box which knocked out all the signalling.
"It's taken until about 10 o'clock to sort that out. It will be three or four hours before we're back to normal.
"I think the evening peak will be okay but it's been a bad morning for our customers."
Arriva and First Great Western have put on replacement buses and urged people to make alternative arrangements.
An ATW spokesman said the power failure was "extremely rare" and an investigation is under way.
He added: "If the power fails everything goes red, nothing moves until the power is restored.
"It will also affect mainline trains. This is extremely rare."
The spokesman said First Great Western (FGW) services arriving in south Wales from London would be turned round at Newport.
ATW said there had been no trains running between Bridgend and Newport, including the Vale of Glamorgan line.
Valleys Lines Trains, which is run by ATW, had nothing running between Barry and Cardiff up as far as Caerphilly.
The power failure left level crossings in the position they were in when the power went down.
It is believed the level crossing at St Fagans, on the outskirts of Cardiff, was down when the power failed and there were reports of severe road congestion.
British Transport Police (BTP) said it had been informed and it is believed the widespread signalling failure was the result of an electricity failure.
"BTP officers have been assisting rail staff with overcrowding problems at railway stations where requested," said a spokesman.
A Welsh Assembly Government spokesman said: "We're in constant contact with Network Rail who have assured us that they are taking all possible steps to rectify the problem."