IT SOUNDS more like an episode of “Thomas the Tank Engine” than a day in the life of a modern railway. But on May 25th an express train from Newcastle to Reading took a wrong turn, and got lost in Pontefract, 150 miles away. That might have been funny were it not part of a wider collapse in train services across northern England since a timetable change on May 20th. Shortages of rolling stock and drivers have resulted in up to 43% of Northern Rail’s trains being delayed or cancelled each day. From June 4th the train operator cancelled 165 trains a day, including all services to the Lake District. The anger of delayed commuters is building steam.

The scale of the timetable changes—the biggest for decades—caught the industry off guard. Schedules for 55% of Britain’s network were revamped, altering the times of over a million trains a year. The idea was to use the opening of the Ordsall Chord, a short line linking up stations in Manchester, and a new Thameslink tunnel under London to increase the number of services in operation. But in practice the new schedules for Northern and GTR, which operates Thameslink, proved impossible to implement. In the first week of the new timetable GTR delayed or cancelled a quarter of its trains. It now announces a new schedule for the next day at 10pm each night.

The underlying problem is that the new timetables were not agreed on far enough in advance, says Anthony Smith of Transport Focus, a watchdog. Northern Rail’s woes were exacerbated by the bankruptcy in January of Carillion, a big contractor, which contributed to the failure of Network Rail, the track operator, to finish the electrification of the Preston to Manchester line on time. That delayed the co-ordination of the region’s schedules. As for Thameslink, GTR failed to agree on a realistic timetable with Network Rail until very late, in part because of the complexity of connecting the cobwebs of lines north and south of London.

The result was too little time to give drivers the several weeks of training they need before they are allowed to carry paying passengers on a new route. The government admits it will take weeks to achieve a steady schedule, and months before things work as intended.

Can Chris Grayling, the transport secretary, survive that long? On June 4th he promised Parliament that he would find out who was responsible for the mess—to which MPs roared: “You!” Unimpressive though he is, some of the problems pre-date his time in office. Network Rail centralised timetablers at its head office in Milton Keynes in 2012, and the resulting loss of local expertise harmed its ability to make big changes, says Christian Wolmar, a rail expert. Nonetheless, passengers may well wonder why there was no “Fat Controller” to organise a Plan B when it became clear that the new timetable alterations were not going to work.

Mr Grayling’s loyalty to the prime minister and to the Brexit cause mean he may be allowed to blunder on. Either way, the government’s reputation has taken a knock. Andy Burnham, the Labour mayor of Manchester, has attacked ministers for discriminating against the north. Even normally supportive Conservative MPs, such as Sir Michael Fallon, have lashed out, in the face of growing mailbags of complaints from angry commuters. Many marginal constituencies lie in exactly the areas hit by the chaos (see map). Tories remember the big swing towards Labour last year in places such as Croydon, where rail services into London had been hard hit by strikes in the previous two years.