Bernie Sanders has won Tuesday's New Hampshire Democratic presidential primary.
With 82 percent of precincts reporting, about 11:30 p.m. Eastern, Sanders had 25.8 percent of the vote, The New York Times reports.
A U.S. senator from Vermont and self-proclaimed democratic socialist, Sanders has run as an independent for the Senate and, before that, the U.S. House, but he challenged Hillary Clinton for the Democratic presidential nomination in 2016. He won the New Hampshire primary that year as well. Given that his home state borders New Hampshire, his strong showing was predicted.
Close behind Sanders was Pete Buttigieg, the former mayor of South Bend, Ind., and the first viable openly gay major-party presidential candidate. Buttigieg had 24.4 percent of the vote.
Buttigieg finished first in last week's Iowa caucus, which was beset by technical problems, so it was several days before results came in. He beat Sanders narrowly in terms of pledged delegates, 26.2 percent to 26.1 percent, while Sanders had a slight edge in the popular vote.
Both candidates were buoyant Tuesday night. "We are going to unite together and defeat the most dangerous president of the modern history of this country," Sanders told supporters at Southern New Hampshire University in Manchester, according to NBC News.
He mentioned all of his major competitors -- Buttigieg, former Vice President Joe Biden, and U.S. Sens. Amy Klobuchar of Minnesota and Elizabeth Warren of Massachusetts -- and offered his "gratitude and respect" to them.
Buttigieg spoke to supporters at Nashua Community College, and he thanked his husband, Chasten, and all those who backed his candidacy. "You asserted that famous independent streak, and thanks to you, a campaign that some said shouldn't be at all has shown that we are here to stay," he said, according to NBC.
"So many of you turned out," he continued. "Die-hard Democrats, independents unwilling to stay on the sidelines, and even some newly former Republicans, ready to vote for something new."
Buttigieg's strong performance indicates the nation is ready for a gay president, said Annise Parker, president and CEO of LGBTQ Victory Fund, which has endorsed him.
"The electability assumptions of political pundits are tumbling down all around us -- with Pete showing in Iowa and New Hampshire that he can build broad coalitions in cities and rural areas and across the political spectrum, Parker said in a press release. "It shatters the notion that an openly gay candidate can win in only the most liberal hotspots and underscores Pete's position as the best candidate to unite Americans in defeating Donald Trump. That the historic nature of his candidacy is relatively subdued is a testament to our progress as a nation. With enormous momentum heading into the upcoming primaries, it is clear America is ready to elect its first openly gay president.
"Voters are gravitating toward Pete because he is the antithesis of Donald Trump -- calm, thoughtful and solutions-oriented.Pete is not going to scream at rallies, point angry fingers or scapegoat entire groups of people to oversimplify complex problems. Voters want Washington to quit the bickering and extremism and produce for the American people and that is why they are choosing Pete."
Klobuchar placed third in the primary, coming off a well-received performance in last Friday's New Hampshire debate. She had 19.7 percent of the vote. "Hello, America! I'm Amy Klobuchar and I will beat Donald Trump," she said in a televised speech Tuesday evening, according to NBC. "My heart is full tonight. While there are still ballots to count, we have beaten the odds every step of the way."
Warren and Biden finished fourth and fifth, with 9.3 percent and 8.4 percent respectively. Both vowed to stay in the race, looking ahead to the Nevada caucus February 22 and the South Carolina primary February 29.
Two candidates withdrew from the race Tuesday: U.S. Sen. Michael Bennet of Colorado and businessman Andrew Yang.