New York City Mayor Bill de Blasio is ending his bid for the White House.

De Blasio announced that he was dropping his quest for the Democratic presidential nomination after his candidacy failed to gain widespread public support in an interview Friday on MSNBC.

"I will support whoever is the nominee," de Blasio said. "The party has moved in a much more progressive direction in the last four years. That's how you're going to excite that turnout we need."

De Blasio entered the race in May, saying that as a fellow New Yorker he was best suited to defeat Donald Trump, calling the Republican president "Con Don" and a "bully."

He positioned himself to the left of most of the Democratic field by focusing on labor issues and union rights, but Senators Elizabeth Warren of Massachusetts and Bernie Sanders of Vermont had already taken the progressive mantle and were far more popular.

His campaign focused on remedying economic inequality and cleaning up Wall Street, the same issues that he ran on in New York City elections. De Blasio had difficulty connecting with rural voters in Iowa, where he spent the majority of his campaign, and was unable to gain support nationally.

"I do think I started later than I would have liked," he said Friday.

In a late August CNN/SSRS poll de Blasio was polling at less than 1% nationally, and never maintained more than 1% of the vote. In a poll of New York voters earlier that month from Siena College, de Blasio was the least popular politician in the state with a mere 26% of voters who had a favorable view of him, while 57% viewed him unfavorably.

He is also unpopular in the city he runs, where 56% of voters had an unfavorable opinion of him, compared with 37% who saw him favorably.

New York City's tabloid newspapers frequently ridiculed de Blasio's candidacy. On the day he announced, the New York Post's cover featured seven people laughing under the headline "De Blasio Runs For President."

He stood out in the first debate by being the first candidate to interrupt another and attack policies, but it didn't manifest itself into meaningful support.

De Blasio, 58, has been mayor of New York City since 2014. During his tenure he passed universal pre-k, mandated paid sick leave in the city and worked to improve housing affordability and eliminated controversial policing tactics such as stop and frisk.