It was the summer of 2017, as New York’s subway trains groaned along on near-100-year-old equipment, throttled by a decades-long lack of funding, when things really came to a head.

In June, a train derailed in Harlem, injuring dozens. A month later, another derailed in Brooklyn. Elsewhere, footage went viral after a train broke down in the middle of a tunnel on a typically sweltering New York summer day. After almost an hour the temperature inside the carriages soared, causing, according to the New York Times, “some riders to panic and one woman to strip nearly naked”.

It became known as the summer of hell. Only 65% of subway trains ran on time. Transport groups claimed trains were running slower than in the 1950s.

Finally, following the Harlem crash, New York’s state governor acted. Andrew Cuomo, who had been widely criticized for his role in the decline, declared a state of emergency.

But without significant investment, there was little cause to believe the system could improve. Two and a half years on, however, New Yorkers are hopeful that a $50bn cash injection can save their subway.

New York’s subway system began operation on 27 October 1904. The New York Times reported that a “great throng” gathered at city hall and cheered as Mayor George McClellan declared the subway open. An ebullient McClellan told the crowd: “If this new underground railroad which we are about to open proves as popular and as successful as I confidently expect it to be, it will be only the first of many more, which must ultimately result in giving us an almost perfect system of inter-borough communication.”

In 2019, the New York subway has the largest number of stations of any public transport system in the world. A total of 472 stations are served by 28 different numbered or lettered trains, whose air-conditioned carriages run 24 hours a day, all year round.

It has its drawbacks. The utilitarian system isn’t pretty or particularly comfortable. Trains with hard plastic seats howl deafeningly through cavernous tunnels, screeching their brakes along rodent-infested track beds awash with wastewater and litter.

At the time of summer of hell, the subway had the lowest number of on-time trains of any major transit system in the world. With just 65% of weekday trains arriving to schedule, it was an embarrassment for a city that likes to see itself as the world’s best. As local media dived into the statistics of the subway, it showed that service had declined every year for a decade.

While New York’s trains sputtered along, metro systems in east Asia were raising the bar. Hong Kong’s MTR is on time 99% of the time. The trains on Seoul’s metro system have wifi and televisions. Between 2018 and 2019, Singapore’s MRT trains travelled an average of a million miles between delays of five minutes or more.

“I think some of it you can equate to sort of delayed modernization,” Robert Cervero, a transport expert at the University of California, Berkeley, said of the gulf in quality. He said many of the problems the subway faces in upgrading is that – like the London Underground – it was built in a very different era.

“In China and Hong Kong, you can say the same thing in Korea, the rapid economic development happened in the 90s – in the digital era, during a period of rapid growth of the cyber world, IT, the internet.

“So when they were massively investing in new technologies and their infrastructure, it corresponded to this period of sweeping IT change, so they could invest in the most modern up-to-date systems.”

As metro systems in Asia were being lauded, New York’s subway was gaining attention for its grimmer aspects.

Delayed and overcrowded trains in Brooklyn. Photograph: Andrew Lichtenstein/Corbis via Getty Images

Pizza rat – a dark brown rat manfully dragging a piece of pizza down some subway stairs – became an antihero, while torrential rain turned one station into something approaching a waterslide, nearly sweeping away a would-be traveler in the process. On one subway line a woman was awakened by someone urinating in her face.

Rebecca Bailin, political director at the Riders Alliance, a New York advocacy group, said: “It has really declined over the past five years or so. And the reason is outdated signal technology that causes a lot of delays, and other issues like old train cars that break down.

“The other issue with signal technology is that you can’t run enough trains for the population, so you’ve got incredible overcrowding.”

A chink of light came in 2018, when the Metropolitan Transportation Authority hired Andy Byford to run the New York City Transit Authority. Byford, who is British, has worked in the UK, Australia and Canada, and devised a wide-ranging plan for the subway called Fast Forward.

The plan proposes to introduce modern signalling, so controllers have a better idea of where a train is located in a tunnel. This would mean trains can run closer together, and more trains could run per hour. It wants to make more subways accessible to wheelchair users – currently only 100 stations are step-free – and bring in more than 650 new subway cars. Some of the current train cars were built as far back as 1964.

“That plan, we felt, was pretty, pretty ambitious. It laid out the fixes that were necessary for state of good repair on subways; it laid out major fixes on the bus network as well as improving other projects,” said Nick Sifuentes, the executive director of the Tri-State Transportation Campaign, a not-for-profit that lobbies for better public transport.

Fast Forward was folded into a larger scheme this year, which included overground trains. It delighted transport advocates when it was released as part of a $51.5bn, five-year infrastructure plan in September this year.

Demonstrations by activists – which included carrying a full-size cardboard cutout of Cuomo around subway platforms – combined with the admission of defeat that had sparked the state of emergency declaration, had finally prompted action.

The plan, if passed, will pump state money into improvements, and also introduce congestion charging, which would help the decades-long problem of underfunding Getting funding for New York City-specific transport has been difficult in a state where some cities are 400 miles from New York.

“The MTA is a state-run agency. And for a lot of legislators there are not incentives to fund the MTA. Some of those are legislators who are not in the MTA region, so they don’t have to care. Some legislators are not seeing a whole lot of personal benefit in doing it,” Sifuentes said.

Even for those politicians based in New York City, behind-the-scenes modernization just isn’t sexy. Updating signals isn’t a visible process, and is less likely to get state politicians re-elected than, say, a glitzy – but in comparison unnecessary – new subway station, such the Fulton Center in downtown Manhattan, which opened in 2015, seven years later than planned and twice as expensive as initially projected.

“A legislator from Buffalo can say: ‘There’s no upside for me here’,” Sifuentes said.

“But then a legislator [in New York City] can say: ‘I’m not going to see these improvements for 10 years, so why should I vote for them? Because I only care about four-year [election] cycles.’ So that’s the other piece of it too.”

The subway has improved since the infamous 2017 summer. In September 2019, 82.7% of weekday trains were on time, according to the MTA. More people are riding it too: 4.5% more than in the same month of 2018.

In the last couple of years passengers have been able to get mobile phone service on platforms – something useful given the chronic lack of maps – while more stations now display the train’s time of arrival.

Byford’s plan, if approved at the very end of this year, should help further. But it won’t bring the New York City subway in line of the world’s best: to the near perfect reliability of Hong Kong, or the glamour of Seoul. Some believe that isn’t even possible. Cervero, the University of California professor, said it would take almost a political revolution to redirect the money necessary, hiking property taxes on buildings closer to the subway in a way that has never been done in New York.

“You could probably generate revenue of tens of billions of dollars that might be necessary to upgrading modernization of your subway system,” Cervero said.

“Politically it probably wouldn’t happen. But generation Z, and the millennials, who in 20 years will be running the show – will be in positions of political power – maybe then there will be a willingness to do something more radical along those lines.”

Until then, New Yorkers hope Byford’s $51.5bn plan will kickstart an improvement in service. It won’t be state of the art. But, hopefully, it will mean the summer of hell is firmly in the past.