ATLANTA—Democrats elected Tom Perez, a former labour secretary, as their new national chairman on Saturday over a liberal Minnesota congressman after a divisive campaign that reflected the depths of the party’s electoral failures as well as the energy from resistance to President Donald Trump.

Perez, the first Latino to hold the post, edged Rep. Keith Ellison in the second round of voting by Democratic National Committee members gathered in Atlanta. The new chairman must rebuild a party that in the last decade has lost about 1,000 elected posts from the White House to Congress to the 50 statehouses, a power deficit Democrats have not seen nationally in 90 years.

In a nod to his winning margin of 35 votes out of 435 cast, to say nothing of the lingering friction between old-guard Democrats and outspoken liberal upstarts, Perez tapped Ellison to serve as deputy chair.

“We are all in this together,” Perez said, calling on Democrats to fight “the worst president in the history of the United States.”

Read the latest news on U.S. President Donald Trump

Ellison, who had backing from many liberals, including 2016 presidential candidate Bernie Sanders, added his own call for unity and noted that both men had promised to rebuild state and local Democratic parties across the country.

“We don't have the luxury of walking out of this room divided,” he said, as the two men stood together on stage as some young Ellison supporters jeered from the gallery.

Republicans control the White House, Congress and 33 governorships, while the GOP is one Senate confirmation from a conservative majority on the Supreme Court. Despite President Barack Obama's personal electoral successes, the party suffered crushing defeats, losing the House majority in 2010 and the Senate in 2014.

Trump said via Twitter: “Congratulations to Thomas Perez, who has just been named Chairman of the DNC. I could not be happier for him, or for the Republican Party!”

Perez had told party activists earlier in the day that Democrats face a “crisis of confidence” and “a crisis of relevance.”

Perez first entered the race upon urging from Obama and his inner circle, and the former president released a statement praising both men after the vote.

“I know that Tom Perez will unite us under that banner of opportunity,” Obama said, “and lay the groundwork for a new generation of Democratic leadership for this big, bold, inclusive, dynamic America we love so much.”

The son of Dominican immigrants, Perez comes to the job with a demonstrably liberal record as a civil rights attorney and backer of organized labour, but he carried the establishment label as a Maryland resident who's spent years in the Washington orbit, working in the Justice Department and ultimately as an Obama Cabinet officer.

Former Vice-President Joe Biden endorsed him; one of Obama's closest aides, Valerie Jarrett, made calls to DNC members on Perez's behalf as late as Friday night.

The new chairman will not be the undisputed “leader of the party,” even with Democrats out of power.

Senate Minority Leader Chuck Schumer of New York and House Minority Leader Nancy Pelosi of California will remain the highest ranking Democrats in Washington. But Perez must now join with Schumer and Pelosi as part cheerleader, part fundraiser, part organizer and recruiter, part public messenger, helping frame the party's arguments and identity, while charting a strategy to turn energy into votes in upcoming elections.

Loading... Loading... Loading... Loading... Loading... Loading...

Perez and Ellison appeared together for a joint news conference afterward in a session that was originally planned to be the winner's opportunity to address reporters. Perez said they “are going to put our values in action” for a country he described as “fearful” over Trump's priorities.

Ellison had the endorsement of Sanders, who challenged Hillary Clinton for the Democratic nomination, but also from Schumer.

Liberal groups that backed Ellison ranged from guarded to despondent with the outcome.

Sanders released a statement congratulating Perez but warning that “it is imperative that Tom understands that the same-old, same-old is not working.”

Jim Dean, chair of Democracy for America, called Perez's election “incredibly disappointing” and said the “resistance will persist ... with or without the leadership of the Democratic National Committee.”

Jeff Weaver, who managed Sanders' presidential campaign and now runs the offshoot “Our Revolution” group, said Perez and Ellison have to prove themselves now.

“Do they really invest in 50 state parties? Are they really going to engage with people in the streets?” Weaver asked. “Are they really going to bring those people into the party, so that you have a much broader cross-section of Democratically aligned voters represented?”

Ellison told reporters that he “trusts” Perez, and he encouraged other liberal activists to do the same.

Perez succeeds Chairwoman Donna Brazile, who led the party as interim chief in the fallout from disclosure of the DNC hacking.

Brazile said the party has worked with cybersecurity experts to address vulnerabilities. She chided Trump for his mockery of DNC cybersecurity and his doubts that Russians are at fault.

“No, Donald Trump,” she said, “you can't go to Staples and buy anti-Russian hacking software.”

Read more about: