Network Rail (NR) has been ordered to return £53.1m to the Treasury after it "failed to deliver" on major routes.

The Office of Rail Regulation (ORR) said that during 2013/14 long-distance and major commuter line punctuality was 86.9%, "significantly short" of the average target of 92%.

The fine will be used to part-fund a pledge to spend up to £90m improving free wifi access on routes across England and Wales.

Commuters on routes into London from Bedford, Brighton, Kent and Portsmouth are expected to benefit from connections at least 10 times faster than those currently available, along with those using services into Leeds, Sheffield and Manchester.

Rail unions criticised the "crazy money merry-go-round" that saw NR funds taken back after failing to meet planned improvements in performance in the five years to March 2014.

TSSA leader Manuel Cortes said: "All the politicians are doing is taking taxpayers' money from Network Rail and recycling it through the Treasury - this time to spend on one of their pet projects, faster wifi that should be paid for by the private rail companies.

"Once again, passengers lose out while private rail firms are laughing all the way to the bank."

ORR chief executive Richard Price said the money was ordered to be returned as NR had been specifically funded to improve train punctuality.

"But it did not deliver its commitments for passengers who travel on long-distance and LSE services," he added.

London and South East England (LSE) passenger services in 2013-2014 saw punctuality levels of 89.6% against a target figure of 93%.

Between 2009 and 2014, the ORR said around 73,100 additional late trains over and above funded obligations, while for the LSE area there were some 265,500 additional late trains.

However, the ORR said NR did achieve infrastructure targets, bringing in rail enhancement plans on time and within budget.

NR chief executive Mark Carne, who joined in February, blamed increased passenger numbers, in part, for the punctuality problems.

"We accept that we have fallen short of the regulatory targets for train punctuality and that this is, in part, down to our failure to reduce infrastructure faults quickly enough," he said.

"At the same time, the sharp increase in passenger demand has led us to run more trains at peak times, even when we know this will lead to a more congested railway and punctuality targets may suffer."

There were more than 1.5bn passenger journeys on the network in 2013-2014, up from around 1.2bn in 2008-2009.