Democratic National Chair candidate, Tom Perez, addresses the audience as the Democratic National Committee holds an election to choose their next chairperson at their winter meeting in Atlanta, Georgia. February 25, 2017. REUTERS/Chris Berry ATLANTA — In an extremely close race that went to multiple rounds of balloting, former Labor Secretary Tom Perez was elected Saturday to head the Democratic National Committee, ending the months-long jockeying for the top spot in the Democratic Party's election arm.

Perez was elected with 235 votes, narrowly defeating Rep. Keith Ellison. South Bend, Indiana, Mayor Pete Buttigieg and Idaho Democratic Party chair Sally Boynton Brown, who also ran, dropped out on Saturday.

During the first round of voting, Perez fell just one vote short of the number needed to win the chair.

In his first motion as chairman, Perez moved to make Ellison the deputy chairman of the DNC, a new position. He praised the Minnesota congressman at length, emphasizing that the Democratic Party needed to come together and comparing the rifts in the party to a "spirited" political discussion over Thanksgiving dinner.

"When I was looking in the audience, there was someone holding up a sign that says 'Unite.' And I could not agree more. For the two of us, that is easy, because we were always united in our values," Perez said. "And we are united in our love for the Democratic Party."

The decision came after a contest which some viewed as a rehash of the 2016 presidential primary, with Perez garnering support from establishment figures like former Vice President Joe Biden and former Attorney General Eric Holder and Ellison representing the ascendant progressive wings of the Democratic Party. President Barack Obama, under whom Perez served, congraulated him on the victory, as did 2016 Democratic nominee Hillary Clinton.

"Congrats to @DNC chair @TomPerez & deputy @keithellison. Excited for strong, unified party standing for best of our country into the future," Clinton tweeted.

Some close to Ellison felt the congressman's victory would have rectified the DNC's treatment of Sen. Bernie Sanders during the primary, in which some DNC staffers appeared to favor Clinton over the Vermont senator.

"The mood is that the previous leadership of the DNC was biased toward one candidate, and biased against another candidate," Brian Ellison, Keith's brother, said shortly before the vote.

"It's not even about Tom Perez. It's about Obama, Hillary, and the people feeling slighted from Bernie Sanders' slight," he added.

Standing onstage after Perez's victory, Ellison called for unity within the Democratic Party, telling supporters that Democrats "don't have the luxury to be divided."

"I'm very very proud of Chairman Perez. He conducted himself with class, grace," Ellison said. "If you came here supporting me ... I'm asking you to give everything you've got to support Chairman Perez."

Some members were unconcerned with the perceived rehash of the primary fight.

"There's a little bit of [animosity] between Tom and Keith and their supporters. But I think we are getting beyond it," said Gary Winston Apple, a DNC member from Missouri who supported Ellison.

Others noted that chairs need to focus on uniting the party.

Los Angeles Mayor Eric Garcetti, who backed Perez, dismissed that the contest was a "proxy war," but advised the chair to call members who did not vote for him to offer an olive branch.

"Call every other person who voted for someone else and say 'This is also your party and you're just as important and I want to work with you,'" Garcetti told Business Insider on Friday.

He added: "Whoever wins should be calling everybody else and saying, 'Let's make sure we're unified.'"