Former Mayor Rudolph Giuliani is saying goodbye to New York City for good after slashing the price on his troubled Upper East Side penthouse.

The New York Post reported that Giuliani sold the three-bedroom apartment at 45 E. 66th St. for $4.95 million. The buyer’s name was not released.

It was once thought that the more-than-10,000-square-foot apartment would fetch $6.5 million.

But the price decreased after multiple re-listings, withdrawals from the market and a return to the market this March at $5.2 million.

The apartment boasts a wood-paneled library, formal dining room, city views and Yankees memorabilia, but the property has been overshadowed by Giuliani’s protracted legal troubles.

The property was nearly seized after two Georgia elections workers won a $146 million defamation judgment against Giuliani after he accused them of ballot tampering.

A judge had ordered the penthouse and other valuables to be relinquished, but Giuliani was able to keep the luxury flat under the terms of a confidential agreement. But the former two-term New York City mayor decided to sell the penthouse anyway.

Records show that Giuliani paid $4.2 million for the apartment in 2002.

Giuliani will now reside in Florida full-time, the Post reported.

Giuliani was lionized as “America’s Mayor” for leading the city through the aftermath of the 9/11 attacks.

Giuliani, who remains popular with Staten Islanders and who was often spotted playing golf and eating pizza here, made a failed bid for the presidency in 2008.

Giuliani’s reputation suffered as a result of his elections work for Trump.

The penthouse sale was first reported by Crains.

If you purchase a product or register for an account through a link on our site, we may receive compensation. By using this site, you consent to our User Agreement and agree that your clicks, interactions, and personal information may be collected, recorded, and/or stored by us and social media and other third-party partners in accordance with our Privacy Policy.