Rail regulator Tom Winsor has accused the government of meddling in an industry it does not understand.
Rail regulator Tom Winsor has often clashed with officials
He told the BBC's Breakfast With Frost programme, that ministers and civil servants had "interfered" in the day to day operations of the railways.
His controversial five-year term comes to an end on 5 July. A lower profile six-member board will replace him.
The rail industry has been cursed over the past few years by a series of fatal accidents and cost-overruns.
Mr Winsor said the government had "assumed responsibility for things that really are not their responsibility".
He said the difficulties of the railway were partly to do with "unwarranted political interference", but that a lot of the problems were a "disastrous legacy of Railtrack which was fantastically incompetent".
Mr Winsor also claimed the demise of Railtrack had ended up costing taxpayers between £11bn and £14bn.
Railtrack, which previously managed rail infrastructure was put into administration in October 2001 and replaced by state-backed Network Rail with Mr Winsor as rail regulator.
Back in May this year, Transport Minister Kim Howells promised a radical shake-up of the railways in a bid to tighten the government's grip on the way the industry was run.
He criticised Tom Winsor, saying that a £22.3bn cash boost for Network Rail had caused the transport department "enormous difficulties".
Mr Winsor replied that the system was coherent and rational - but government was failing to play its part.
The railways were auctioned off into private hands in the hope that private cash and new management would transform it from the dark ages of British Rail.
But demands for more government subsidies to modernise the rail infrastructure in the UK have sparked calls from some politicians for renationalisation.
However, Kim Howells had ruled out this option, favouring a radical overhaul to tackle "crazy bureaucracy".