Former mayor of New York City Bill de Blasio penned an op-ed for the Atlantic published Tuesday warning that Biden should not make the same mistakes he did. 

De Blasio wrote glowingly of the president, saying there was still time for his message and governance to resonate with voters.

"When it comes to being unpopular, I’m unfortunately somewhat of an expert. I made my fair share of mistakes. President Biden and the Democratic Party should learn from them," he wrote.

WHITE HOUSE EYES INCOME CAP FOR TRANSFERRING STUDENT DEBT

De Blasio recounted his two terms as mayor, warning that "real policy" was not a substitute for "real popularity," and claiming that his popularity tanked at the end of his tenure due to a lack of connection with voters.

De Blasio's last years in office were controversial and fraught with contention on issues ranging from crime and law enforcement to his administration's response to the COVID-19 pandemic.

Mayor Bill de Blasio

Mayor Bill de Blasio gestures as he leaves Delacorte Theater in Central Park in New York on March 16, 2021. (Lev Radin/Sipa USA)

"I failed to give New Yorkers a clear sense of where I was taking them. I lost my connection with the people because I mistook real policy for real popularity. I let a focus on individual initiatives, no matter how noble or substantive, distract me from offering an overarching vision for the future."

Instead, de Blasio stressed the need for a short and snappy message to show voters the future America that the administration is working toward.

"Biden still has a chance to do what I did not: present a clear, sharp message and repeat it incessantly. And I don’t just mean a catchphrase, but a vision for the direction of the country under his administration."

Joe Biden Jill Biden

President Joe Biden and first lady Jill Biden arrive at the annual White House Correspondents' Association dinner, Saturday, April 30, 2022, in Washington. (AP Photo/Patrick Semansky)

President Biden spoke at the first White House Correspondents' Dinner since 2019 Saturday evening, poking fun at his low approval ratings and the Republican "Let’s Go Brandon" slogan targeting him. Some of his jokes got more laughs than others. 

"Special thanks to the 42% of you that actually applauded," Biden joked as he came onto the stage in front of a crowd of around 2,000 journalists and celebrities gathered at the Washington Hilton. 

"I’m really excited to be here tonight with the only group of Americans with a lower approval rating than I have," he added. 

CLICK HERE TO GET THE FOX NEWS APP

There has been much speculation about Democrats potentially competing in a primary against Biden, who is suffering from historically bad polling. 

Analysis from The Washington Post recently ranked Transportation Secretary Pete Buttigieg above Vice President Harris, who also has had poor favorability. Others listed include former 2020 candidates Sens. Elizabeth Warren, Amy Klobuchar and Cory Booker, as well as California Gov. Gavin Newsom and even New York Rep. Alexandria Ocasio-Cortez. 

Fox News' Joseph A. Wulfsohn and Jon Brown contributed to this report.