Former Mayor Bill de Blasio has announced that he is withdrawing from the race for an open congressional seat and ending his career in electoral politics.

“It’s clear the people of #NY10 are looking for another option and I respect that,” de Blasio tweeted on Tuesday afternoon. “Time for me to leave electoral politics and focus on other ways to serve.”

In a brief telephone interview, the former mayor told Gothamist that his reasons for dropping out were a combination of internal and outside polling as well as being “beat on resources.”

His campaign recently reported raising over $500,000 in campaign donations, the third-highest among all the candidates, but far short of the millions raised by two of his rivals.

The race to represent the 10th Congressional District, which covers Lower Manhattan and parts of Brooklyn, is among the most competitive and crowded midterm contests in New York this year. Along with de Blasio, 12 other candidates successfully petitioned to get on the August 23rd ballot. They include: ex-prosecutor Daniel Goldman, Westchester Congressman Mondaire Jones, City Councilmember Carlina Rivera, and state Assemblymembers Yuh-Line Niou and Jo Anne Simon.

Back in May, the 61-year-old appeared to relish the opportunity to return to elected office after eight years as mayor left him with some regret, he said.

But he struggled in the polls and failed to win any significant endorsements. Early interviews with voters in the district suggested many were disenchanted with the Park Slope resident despite widely praised progressive policies like universal pre-K.

Prior to becoming mayor, de Blasio also served as public advocate and as a city councilmember. His district included Park Slope, where he has since returned to live.

In a video shot outside his neighborhood, the former mayor once again offered a self-critical appraisal of his political journey.

“I made mistakes. I want to do better in the future,” he said. “The bottom line is, I’m filled with gratitude today truly.’”

This story has been updated with new information.