Now comes the hard part.

Gliding to his second landslide victory, Bill de Blasio was re-elected on Tuesday as the mayor of New York City, overwhelming his Republican challenger, Nicole Malliotakis, and a handful of independent candidates in what he declared a persuasive affirmation of his progressive agenda.

Mr. de Blasio, the first Democratic mayor to be re-elected in a generation, since Edward I. Koch captured his third term in 1985, now has four years to further his goal of reshaping the city in his progressive mold.

“It’s a good night for progressives,” Mr. de Blasio said at a victory party at the Brooklyn Museum, with his wife, Chirlane McCray, and his son, Dante, at his side. “For the first time in 32 years, a Democratic mayor was re-elected in New York City. But let’s promise each other: This is the beginning of a new era of progressive Democratic leadership in New York City for years and years to come.”

Yet Mr. de Blasio’s ability to deliver on his agenda may have far more to do with the winds blowing out of Washington and Albany than with circumstances in the five boroughs.