Democrats chose Tom Perez, a former Barack Obama cabinet member, as their new leader Saturday, tapping an establishment candidate to lead the fight against US President Donald Trump and claw back the ground lost to Republicans in Congress.

With opposition Democrats preparing for crucial 2018 midterm elections and the nation´s next presidential race on the distant 2020 horizon, nothing less than the future of the party was seen as being at stake.

Perez, a Hispanic-American and former secretary of labor under Obama, named as his deputy the contest´s runner-up Keith Ellison — a progressive representative who has left open the prospect of pushing to impeach Trump.

“Someday, they´re going to study this era in American history… and ask the question, of all of us, where were you in 2017 when we had the worst president in the history of the United States?” the 55-year-old Perez said.

“And we will all be able to say, the united Democratic party led the resistance, ensured this president was a one-term president and elected Democrats across this country.”

Ellison, an 53-year-old African American who is the first Muslim elected to the US Congress, warned that “we don´t have the luxury to walk out of this room divided.”

The fight over who chairs the Democratic National Committee (DNC) appeared at times to be a proxy battle between the supporters of two 2016 also-rans: defeated Democratic presidential nominee Hillary Clinton and her liberal primary rival Bernie Sanders.

Perez, who won 235 votes against 200 for Ellison, was seen as the establishment pick.

He will succeed the DNC´s interim chair Donna Brazile, who took over after Representative Debbie Wasserman Schultz was forced from the position last summer when leaked emails showed that members of the organization, which pledges neutrality in presidential primaries, favored Clinton over Sanders.

A third DNC candidate, South Bend, Indiana Mayor Pete Buttigieg — a gay, 35-year-old Rhodes Scholar and military veteran — dropped out of the race before the vote, which was held in Atlanta, Georgia.

Perez ´will unite us´

Liberal Democrats were quick to pounce on Perez, with progressive group Democracy for America criticizing the “incredibly disappointing result.”

Choosing Perez “is another missed opportunity for a Democratic Party desperately trying to regain relevance and proves, once again, how out of touch party insiders are with the grassroots movement currently in the streets, on the phone and at town halls nationwide,” said the group´s chair Jim Dean, an early supporter of Ellison in the race.

But Obama, who cast himself in the 2008 elections as the country´s “great uniter,” called for mending rifts.

“What unites our party is a belief in opportunity — the idea that however you started out, whatever you look like, or whomever you love, America is the place where you can make it if you try,” he said.

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