New York City Mayor Bill de Blasio dropped out of the 2020 presidential race Friday, ending a long shot bid for the Democratic nomination that never went anywhere.

"I feel like I have contributed all I can to this primary election, and it’s clearly not my time, so I’m going to end my presidential campaign," de Blasio said in an interview on MSNBC’s “Morning Joe.”

“We have a chance to get it right in 2020,” de Blasio added. “Whoever our nominee is, let’s make sure we’re talking to the hearts of working people.”

De Blasio said he would not be endorsing any of his fellow candidates "today" but that he would "think about" doing so in the future. He added that he would "of course" support "whoever the eventual nominee is."

In a piece for NBC News' THINK, de Blasio explained that he would continue "fighting for working people and ensuring that New York City remains the vanguard of progressivism will continue to be my missions."

President Donald Trump — a frequent critic of de Blasio — immediately chimed in, jeering in a post on Twitter that the exit from the race by the "Part time Mayor" was "big political news, perhaps the biggest story in years" and that "NYC is devastated" that "he's coming home."

Oh no, really big political news, perhaps the biggest story in years! Part time Mayor of New York City, @BilldeBlasio, who was polling at a solid ZERO but had tremendous room for growth, has shocking dropped out of the Presidential race. NYC is devastated, he’s coming home! — Donald J. Trump (@realDonaldTrump) September 20, 2019

De Blasio’s bid — launched in May — ultimately lasted just over four months and was largely mocked for most of its short life.

He was widely unpopular in New York City, with an April Quinnipiac Poll showing that more than three-quarters of New Yorkers felt he shouldn’t run, and faced a stiff upward climb in a crowded field of Democratic candidates.

Download the NBC News app for breaking news and politics

De Blasio had attempted to run on a record of progressive accomplishments, including enacting universal pre-kindergarten and helping to raise the minimum wage to $15 an hour.

But his campaign never took off. A slew of national polls showed him stuck with just 1 percent support — and often times even less. A Siena College poll released earlier this week showed him with 0 percent, even in New York City.

De Blasio failed to qualify for the Democratic debate earlier this month and was all but certain to fail to qualify for the one scheduled for October.

His brief campaign was marred with sparsely attended events and a bevy of unforced errors.

He made headlines in August after an event in Iowa drew only about 15 people.

De Blasio attempted to use Twitter to brand Trump as “ConDon,” but that, too, drew mockery because it means condom in Spanish.

And he continued earning the scorn of his fellow New Yorkers for being on the campaign trail during crises in New York City, including a widespread power outage in July.

Even his entrance into the race in May was bogged down with challenges: A Missouri teenager stole the spotlight from his campaign when he scooped the New York City mayor's announcement.

In dropping out, de Blasio joins a growing list of candidates who ended their runs early — and on their own terms.

Last month, Sen. Kirsten Gillibrand, D-N.Y., announced she was ending her presidential bid. Earlier, Washington Gov. Jay Inslee, Massachusetts Rep. Seth Moulton, former Colorado Gov. John Hickenlooper and California Rep. Eric Swalwell all also left the Democratic race. There are still 17 people running in the Democratic field.