ATLANTA (AP) - Democrats chose former Labor Secretary Tom Perez as their new national chairman Saturday over a liberal Minnesota congressman, capping 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 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."
Ellison, who had backing from many liberals, including 2016 presidential candidate Bernie Sanders, added his own call for unity and noted that he and Perez both want to rebuild state and local Democratic parties across the country.
"We don't have the luxury of walking out of this room divided," Ellison said, as the erstwhile rivals stood together on stage as some young Ellison supporters jeered from the gallery.
Trump chimed in 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!"
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.
Perez told party activists earlier in the day that Democrats face a "crisis of confidence" and "a crisis of relevance."
The new chairman first entered the race upon urging from Obama and his inner circle. 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 labor, 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.
Perez 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.
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.
Besides his endorsement from Sanders, who challenged Hillary Clinton for the Democratic nomination, Ellison had backing from Schumer, who is not regarded as a hero of party liberals.
Liberal groups that backed Ellison ranged from guarded to despondent with the outcome.
Sanders released a statement congratulating Perez but warned "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 now must prove themselves as a leadership duo.
"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 he "trusts" Perez, and he encouraged 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, as U.S. intelligence officials have said.
"No, Donald Trump," Brazile said, "you can't go to Staples and buy anti-Russian hacking software."
Follow Barrow on Twitter at https://twitter.com/BillBarrowAP .