It was only two years ago that New York City’s subway fell into such a dire crisis that Gov. Andrew M. Cuomo took the extraordinary step of declaring a state of emergency, pouring hundreds of millions of dollars into the system and hiring one of the world’s most respected transit leaders.

The subway has rebounded from its nadir, when significant disruptions regularly upended the city, and riders lost faith in the system.

The on-time rate for trains has jumped to 80 percent this summer, up from 65 percent in 2017. Subway cars are breaking down less frequently and the number of major delays are down.

But as the subway continues to dig itself out of a deep hole, its leaders are left facing an even bigger challenge — transforming the system into a modern subway worthy of a global capital.