New York City Mayor-Elect Zohran Mamdani will live in the Manhattan mansion that his predecessors have called home, leaving behind a rent-stabilized apartment that became the subject of heated debate during his campaign.

Gracie Mansion, which dates to 1799, has served as the residence for most New York City mayors since World War Two.

But Mamdani, for whom affordable housing is a central issue, did not confirm he would live there immediately following his victory in November.

This decision came down to our family's safety and the importance of dedicating all of my focus on enacting the affordability agenda New Yorkers voted for, Mamdani said in a statement on Monday.

He has been living in the Astoria neighborhood in the borough of Queens. The area, home to many middle-class families, is famous for its abundance of immigrant communities and global cuisine.

To Astoria: thank you for showing us the best of New York City, Mamdani's statement said. While I may no longer live in Astoria, Astoria will always live inside me and the work I do.

During his campaign, Mamdani tied his core platform - freeze the rent – to his own housing situation. But his rivals, mainly former New York Governor Andrew Cuomo, criticized Mamdani for occupying the apartment even though he came from a famous family. His mother is the filmmaker Mira Nair, and his father, Mahmood Mamdani, is a professor at Columbia University.

Not every mayor has chosen to live at Gracie Mansion. Michael Bloomberg, the billionaire entrepreneur and founder of the eponymous financial and media company, chose to live in his own townhouse on the Upper East Side neighborhood of Manhattan during his three terms, which ended in 2012.

When Mamdani moves in, sometime around his inauguration on 1 January, he will find himself in surroundings very different than his modest Astoria digs.

With its butter yellow paint, green shutters, and white railings, Gracie Mansion is a wedding cake of a house overlooking the East River. Inside, the lower floor of the Federal-style mansion is decorated in the spirit of the home's original era.

The compound, which has five bedrooms, also has enhanced security to protect the mayor and their family.

Mamdani's current apartment is rent stabilized, meaning the city sets limits on how much landlords can raise the rent each year. New Yorkers consider these apartments valuable lifelines as the cost of housing outpaces what many can afford.

Records showed Mamdani paid about $2,300 (£1,725) each month for his apartment. According to the real estate platform Zillow, the average rent for a one-bedroom apartment in New York City is $3,500 (£2,625) a month.