After a difficult 2016 campaign that saw them lose in the White House, both chambers of Congress and in state houses across the country, Democrats elected Tom Perez, the former Labor Secretary during the Obama Administration, to lead the Democratic National Committee on Saturday.
Perez won in the second round of voting during the 2017 Winter DNC Meeting in Atlanta, earning 235 votes from the 447 DNC members — the voting bloc that decides the chairmanship. Perez was considered the heavy favorite of the Democratic establishment.
Minnesota Congressman Keith Ellison, the preferred candidate of the Bernie Sanders wing of the party, came in second, earning 200 votes in the second round of votes. Half ballots are given to Democrats voting abroad.
More from NBC News:
Trans students face 'detrimental' health effects without fed protections
DHS draft report casts doubt on extra threat from 'travel bank' nationals in U.S.
Americans agree Obamacare needs a fix. The question is: How much of one?
Ellison stated that it was necessary to unite behind Perez for the party to move forward. He was appointed the party's deputy chairman.
The other five candidates dropped out of the race before the second round of votes, leaving it to establishment favorite Perez and Ellison, the preferred candidate of the more liberal wing of the party.
Mayor Pete Buttigeig of South Bend, Indiana, did not make it to the voting process, announcing during his nomination speech that he would be exiting the race. Buttigeig, 35, built a national profile as an emerging dark horse in the race for the chairmanship with the backing of former DNC Chairman Howard Dean.
"I want to thank my competitors for their graciousness beginning the day I got into this race — proving what unites us is greater than our divisions," Buttigeig said.
"It looks like I'm not going to be the next chair," he added. "But whoever is, I am urging to do the things that must be done to be open to change, to look beyond Washington, to not treat the presidency like it's the only office that matters, to pay attention to communities like ours in the heart of our country — not as an exotic species — but as your fellow Americans."
The former Naval intelligence officer campaigned on the idea that the aging Democratic Party needed to empower its millennial members.
The 447 members of the Democratic National Committee will vote Saturday morning, gathering in a ballroom to cast their ballots for chair and other party officer positions.
If nobody secures a majority, candidates will have a short window to lobby members of the DNC before another round of voting. Members will keep voting until a winner emerges in the seven-candidate field.
On the eve of the election, Perez forces were feeling confident as they told Democrats they had pulled ahead, buoyed by the late endorsement of Jaime Harrison, the chairman of the South Carolina Democratic Party, who quit the chairman's race Thursday to endorse Perez.
"We're going to be unified and we're going to get this thing done on the first ballot," Harrison told supporters Friday night.
The DNC's chief fundraiser, Henry Munoz, who is running unopposed for reelection as Finance Chairman, gave Perez a final boost late Friday with his endorsement after remaining neutral throughout the race.
Ellison allies acknowledged they were in a weaker position, but pushed back on the Perez campaign's attempts to create an air of inevitability.
"It's that moment. It is that moment to bring forth your strongest argument," Ellison told supporters.
In such an insular race, voters commitments to cast a ballot in a certain way don't always materialize and anything can happen.
And after a four-month election, candidates in all camps spent the closing days saying whoever won the chair's race need to heal the rift between the party's establishment wing, represented by Perez, and anti-establishment side, which has rallied behind Ellison.
Candidates campaigned up until the last minute, buttonholing undecided DNC members at a hotel bar after midnight and host parties with live bands and free food.
Ringers were flown in to give candidates a final boost with the dwindling number of voters still not aligned with either candidate.
New York City Mayor Bill DeBlasio towered over DNC members as he pressed his case for Ellison. "Keith Ellison is a man of destiny," he told them. "This is not an optional situation. We need Keith Ellison."
Meanwhile, Valerie Jarrett, the longtime confidant of former president Obama, phoned DNC members to support Perez, while Los Angeles Mayor Eric Garcetti reinforced Perez' troops on the ground.