After being lured to New York two years ago to help revive the city’s subway, Andy Byford earned praise from riders and mass transit advocates for bringing about improvements on an antiquated system that had been undermined by breakdowns, delays and mismanagement.

But as Mr. Byford rose in stature, even earning the nickname “Train Daddy” among rail enthusiasts, he increasingly clashed with the one official who has the final say over the subways: Gov. Andrew M. Cuomo, who considers himself something of a modern-day master builder.

On Thursday, Mr. Byford resigned, sowing doubt about the future of extensive plans that are intended to modernize the nation’s largest subway system. Corey Johnson, the City Council speaker, responded with one word on Twitter: “DEVASTATED.”

Mr. Byford suggested in his resignation letter that he had chafed over a plan supported by the governor to scale back his duties as part of a reorganization for the Metropolitan Transportation Authority, the state agency that runs the subways and is controlled by Mr. Cuomo.