Dan Garodnick, who has served as New York City’s top planning official for the past four years, is stepping down from his role — a move that comes after he didn’t land a senior post in Mayor Mamdani’s City Hall, the Daily News has learned.

Garodnick was first appointed by ex-Mayor Eric Adams in January 2022 as director of the Department of City Planning and chair of the City Planning Commission.

In those posts, he has been credited with spearheading the Adams administration’s achievements on housing, including advancing the “City of Yes” plan and enacting several neighborhood rezonings that paved the way for the construction of tens of thousands of affordable apartments at a time of skyrocketing rents in the city.

As previously reported by The News and other outlets, Garodnick, a former City Council member, was under consideration by Mamdani to become a deputy mayor, likely with a focus on housing and planning.

But Mamdani, who took office last week, ultimately never moved to appoint Garodnick to a deputy mayor perch. So on Thursday, the planning czar sent an email to his staff informing them he’s leaving city government.

“I do not take my departure lightly. I have deep affection for this agency, enormous pride in our work, and tremendous respect for all of you,” Gardonick wrote in the message, a copy of which was obtained by The News. “But after our four incredibly productive years together, the time is right for me to move on.”

Gardonick wrote his resignation isn’t effective immediately.

“I told the mayor that I will stay on for some time to support the transition, so I am not leaving right away,” he wrote, without providing a date for his departure. “I expect to have plenty of time for goodbyes, at least for now.”

Mamdani spokeswoman Dora Pekec confirmed Garodnick had informed the mayor of his decision, but did not provide any other immediate comment.

It was not immediately clear who Mamdani may pick to replace Garodnick. The appointment could be critical for Mamdani’s agenda, as the planning director plays an instrumental role in advancing and structuring plans for affordable housing construction.

The democratic socialist mayor centered his campaign on a pledge to drive down costs for New Yorkers, including rents. Besides his promise to freeze rents for the city’s two million stabilized tenants, he has said his administration will facilitate the construction of 200,000 new rent-stabilized apartments over the next decade, a plan that could be logistically tricky.

At one point, sources said it appeared likely Garodnick was going to net a deputy mayor role focused on housing, economic development or both.

Ultimately, however, Mamdani switched up the deputy mayor hierarchy by naming Leila Bozorg as his deputy mayor for housing and planning and Julie Su as his deputy mayor of economic justice.

In the view of many city government veterans, Garodnick leaves behind big shoes to fill.

“Dan was a shining star in city government over the last few years. It is nearly impossible to see City of Yes or the Midtown South rezoning get done without Dan being at City Planning leading the charge,” said ex-City Councilman Keith Powers, the chamber’s former majority leader. “He is widely respected and understands city government better than most.”