Democrat Andrew Yang, an entrepreneur who created buzz for his presidential campaign by talking about his love of math and championing a universal basic income that would give every American adult $1,000 per month, suspended his 2020 bid on Tuesday.

"I am the math guy, and it is clear to me from the numbers that we are not going to win this race," Yang said in front of a crowd of supporters as votes in New Hampshire's first-in-the-nation primary were being counted.

"This is not an easy decision, or something I made lightly with the team. Endings are hard and I've always had the intention to stay in the race until the very end," he added. " But I have been persuaded that the message of this campaign will not be strengthened by my staying in the race any longer."

The 45-year-old was one of the breakout stars of the Democratic primary race, building a following that started largely online but expanded to give him enough donors and polling numbers to qualify for the first six debates. Yang announced his departure from the race shortly before Colorado Sen. Michael Bennet did Tuesday night, bringing the Democratic field to single digits.

He outlasted senators and governors, and after initially self-funding his campaign, he raised more money than most of his rivals, bringing in over $16 million in the final quarter of last year. It was a bigger haul than all but the top four candidates: Vermont Sen. Bernie Sanders, former South Bend, Indiana, Mayor Pete Buttigieg, former Vice-President Joe Biden and Massachusetts Sen. Elizabeth Warren.

"We went from a mailing list that started with just my Gmail contact list to receiving donations from over 400,000 people around the country and millions more who supported this campaign," Yang said before pledging to support whoever becomes the Democratic nominee.

Yang grew his outsider candidacy by campaigning as a non-politician, someone who mixed unconventional campaign events -- from bowling to axe throwing -- with serious talk about the millions of jobs lost to automation and artificial intelligence and the dark outlook for American jobs and communities.

The graduate of Brown University and Columbia Law School gave campaign speeches full of statistics and studies that often resembled an economics seminar. His supporters, known as the Yang Gang, donned blue hats and pins with the word MATH -- short for his slogan Make America Think Harder.

Yang promoted his signature issue of universal basic income, which he dubbed the "freedom dividend," by announcing during a debate that he would choose individuals to receive the monthly $1,000 checks. The statement prompted questions about whether he was trying to buy votes, but also generated a buzz online and helped the campaign build a list of possible supporters.

His backers said they were ready to carry on Yang's message for a basic universal income.

"This is the beginning. It's the beginning," said Hellen Suh, a 47-year-old supporter from New York. "The Yang Gang isn't going to stop. It's a movement. People realize that UBI is going to be necessary no matter what because of technology. It's inevitable. Not only that, his humanity first message is very powerful. We need to take care of everybody."

Steve Marchand, the former mayor of Portsmouth who was a senior adviser for the Yang campaign, was disappointed his candidate pulled out but was encouraged by how far he had come in such a short time.

"On one level, you can't help but feel a little disappointed because you want to keep going," Marchand said. "I truly believe he gives us the best chance to defeat Donald Trump and to do it in a way that will transform the economy in a way we need. But I am also unbelievably proud."

Yang's poll numbers were high enough, combined with his fundraising strength, to qualify him for all of the 2019 debates, though he fell short of Democratic National Committee's qualifications to participate in the January debate in Iowa. He was, however, one of seven candidates who participated in Friday's debate in New Hampshire. His departure from the race almost guarantees that the Democrats, who once had the most diverse presidential field in history, will have no candidates of colour on the debate stage again this cycle.

Yang spent most of January in the leadoff caucus state, including a 17-day bus tour during which he told voters his finish in Iowa would "shock the world."

------

Associated Press writer Michael Casey in Manchester, N.H., contributed to this report.