President Trump — a lifelong New Yorker who was for decades one of the city’s most prominent denizens — has changed his permanent residence from Manhattan to Palm Beach, Fla.

In paperwork filed with the Palm Beach County clerk and comptroller in late September, Trump declared, “I am, at the time of making this declaration, a bona fide resident of the State of Florida.” Melania Trump, the first lady, filed an identical document.

The form, known as a “declaration of domicile,” lists 1100 South Ocean Blvd. as the president’s new home — Trump’s Mar-a-Lago resort, which he sometimes calls his “Winter White House” and where he has spent nearly 100 days since taking office, according to one tally.

In his first public comment on the change of address, first reported by the New York Times, Trump said he “hated having to make this decision, but in the end it will be best for all concerned.”

“I cherish New York, and the people of New York, and always will,” Trump wrote in a tweetstorm late Thursday, “but unfortunately, despite the fact that I pay millions of dollars in city, state and local taxes each year, I have been treated very badly by the political leaders of both the city and state. Few have been treated worse.”

As news of the change spread, some of those city and state leaders, all Democrats, endorsed Trump’s decision.

“Good riddance,” Gov. Andrew M. Cuomo tweeted. “It’s not like @realDonaldTrump paid taxes here anyway … He’s all yours, Florida.”

Corey Johnson, New York’s city council speaker, agreed: “GOOD RIDDANCE!!,” he bade Trump in a tweet.

“Don’t let the door hit you on the way out or whatever,” quipped Mayor Bill de Blasio.

In the declaration, Trump refers to Trump Tower — his home since the early 1980s, the place where he launched his presidential campaign — in the past tense: “I formerly resided at 721 Fifth Avenue.”

Trump lists his “other places of abode” as 1600 Pennsylvania Ave., the White House’s address, and Trump National Golf Club Bedminster in New Jersey, where he has spent 90 of his days as president, according to the NBC News tracker.

Trump was born and raised in Queens, where he took over his father’s real-estate business before moving it to Manhattan.

In his Twitter posts, the president alluded to his local unpopularity — nearly 80 percent of New York City voted for Hillary Clinton in 2016 — but a person close to the president said his decision was based mainly on taxes. That would make Trump one of many wealthy individuals to seek refuge in the southern state.

Because Trump has refused to make his tax documents public, it’s unclear how much money he stands to save in the move; but Florida notably does not have a state income tax or an estate tax.

In New York, meanwhile, the state’s top tax rate is nearly 9 percent, and the city’s top rate is nearly 4 percent. The state’s top estate tax rate — applying to fortunes greater than $10.1 million — is 16 percent.

“The move to Florida could save him a lot of money,” said commentator and former President Clinton aide Keith Boykin on Twitter, “but we don’t know how much because he won’t release his tax returns.”

White House senior adviser Kellyanne Conway defended Trump to reporters on Friday and accused Cuomo of taking “a cheap shot” at the president.

“First of all, he’s making the best decision for him," Conway said. "But he sent a signal to New York that they’ve heard from other overly-taxed, highly-taxed individuals. Many people have fled New York and other high-tax states to low-tax states.”

But Trump is also in the middle of a legal battle with Cyrus R. Vance Jr., Manhattan’s district attorney, who subpoenaed eight years of the president’s tax returns.

After a federal judge rejected Trump’s sweeping claim of immunity as “repugnant” to the Constitution, he seethed on Twitter at Vance and his investigation.

But in his farewell posts — a 2019 rendition of “Goodbye to All That” — Trump said he would still “cherish New York, and the people of New York.”

He concluded, “It will always have a special place in my heart!”

Josh Dawsey and Colby Itkowitz contributed to this report.