Bill de Blasio, the mayor of New York City who sought the Democratic nomination for president, has dropped out of the race.

"Getting out there, being able to hear people's concerns, address them with new ideas, has been an extraordinary experience," de Blasio said on MSNBC's Morning Joe on Friday. "But I have to tell you, at the same time, I feel like I've 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, 58, has been the mayor of New York City since 2014. Prior to that, he was New York City’s public advocate from 2010 to 2013. Before entering city politics, he worked as a regional director in the U.S. Department of Housing and Urban Development, under Andrew Cuomo. He also served as campaign manager for Hillary Clinton’s 2000 U.S. Senate campaign.

More:Who is running for president in 2020? An interactive guide

More:Which 2020 presidential candidate is spending the most?

De Blasio announced his candidacy in May in an video that highlighted New York City's progressive labor, education, and health care policies, emphasizing his role in some of them, such as raising the city minimum wage to $15 per hour.

"As president, I will take on the wealthy, I will take on the big corporations, I will not rest until this government serves working people," he said in the video. "As mayor of the largest city in America, I've done just that." De Blasio also criticized President Trump aggressively in the announcement, calling the him a “bully.”"

“Every New Yorker knows, he's a con artist," de Blasio said. “We know his tricks, we know his playbook.”

Trump responded to the news of de Blasio's departure from the race on Twitter.

"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!," Trump wrote Friday.

De Blasio's announcement video had the title "Working People First," which reflected de Blasio's dominant campaign rhetoric: that his oversight of New York City's blue collar population made him the best fit for Democratic voters.

“This is supposed to be the party of working people,” he said during the first Democratic primary debate in June.

During the debate, he sparred with candidates including former Rep. Beto O’ Rourke, with de Blasio insisting that O’Rourke’s proposition — that private insurance should exist alongside Medicare — was inadequate.

“Private insurance is not working for tens of millions of Americans when you talk about the co-pays,” de Blasio said. “The premiums, the out of pocket expenses, it’s not working.”

As much as New York City served as his calling card throughout his campaign, de Blasio faced vocal criticism from New Yorkers, who were largely unenthusiastic about his White House bid.

More:De Blasio asks son for debate advice to incredulous Twitter reception

By mid-July, the reception became more grave, when the Department of Justice announced that NYPD officer Daniel Pantaleo would not be prosecuted for the death of Eric Garner, an unarmed black man whose chokehold death by Pantaleo became a rallying point for the Black Lives Matter movement.

Activists disrupted the second Democratic primary debate by shouting "Fire Pantaleo!" over the opening statements of de Blasio and Sen. Cory Booker, D-NJ.

De Blasio could not legally fire Pantaleo himself, but critics expressed frustration that de Blasio never advocated for Pantaleo's firing, or wielded his influence as mayor to ensure it. In the wake of Garner's death, de Blasio repeatedly stressed the need for "due process," saying in May that “it’s not my place to pass judgment.” The NYPD Commissioner eventually fired Pantaleo in August.

His time on the campaign trail did little to yield de Blasio much more support. As of Thursday, his national polling average was 0.2%, according to RealClearPolitics. He raised about $1.1 million by the second quarter Federal Elections Commissions deadline in July, well behind the totals of most other candidates, and lackluster even accounting for his late entry into the race.

In August, de Blasio's campaign funds came under scrutiny when the Campaign Legal Center, a campaign-finance watchdog group, submitted a complaint to the FEC, alleging that de Blasio's campaign "allowed a small number of wealthy donors to support de Blasio’s candidacy above legal contribution limits."