ATLANTA — Tom Perez's prize for winning Saturday's dramatic Democratic National Committee leadership election is a divided and out-of-power party that's already stuck between its base and President Donald Trump.
The party's new chairman will have heal its internal divisions, position it for battle with the White House, and rebuild its political infrastructure for the long term — all at the same time.
"The first job is like three jobs in one," said Randi Weingarten, the president of the powerful American Federation of Teachers union and a DNC member.
The protests that nearly drowned out Interim Chairwoman Donna Brazile when she announced the results of the election made the challenges to Perez, who bested Rep. Keith Ellison on the second round of voting after Perez fell a single vote short on the first.
Meanwhile, Trump's tweet sarcastically congratulating the former labor secretary on his victory was a reminder that Perez is coming late to an already heated internal debate about how much the party should obstruct Trump and which lines of attack it should choose from the myriad of possibilities.
Perez, the DNC's first Latino leader, earned cheers for calling Trump "the worst president in the history of the United States" Saturday, but demurred when asked if he agreed with Ellison's charge that the president had already committed impeachable offenses.
It's just one of many points of conflict that are likely to emerge after an intense leadership campaign — the party's first contested chairmanship election in more than three decades — that inflamed grievances born out of last year's presidential primary between Hillary Clinton and Bernie Sanders.
"I recognize I have a lot of work to do. I recognize I have a lot of listening to do," Perez, hoarse after long race, told reporters.
Perez made a down payment on that goal by immediately naming Ellison deputy DNC chairman, a position created specifically for the Minnesota congressman, who urged his supporters to come give Perez a chance.
"I trust Tom Perez. If you trust me, then you've got to come on board with Tom Perez," Ellison said, standing next to Perez and wearing his campaign's button.
Perez chafed at the "establishment" mantel he inherited after getting into the race a month after Ellison at the urging of people close to former President Barack Obama and Hillary Clinton, but understood the reality of the situation.
Ellison allies saw the election as a choice between the party's base and its incumbent leadership class. But in an insider's race like this one, in which only the 447 members of the DNC got to cast a ballot, the odds were always against them.
Ellison's 200 votes on the first ballot — just 15 short of the necessary threshold — stunned Perez allies, whose whip counts pegged his support much lower. But in the end, the establishment won again.
"For people who already feel marginalized by the party, it's like a punch in the gut," said Melissa Byrne, a former Sanders staffer who ran a longshot bid for DNC vice chair.
By all accounts, Ellison and Perez and actual friends, and Ellison's district was the one Perez visited the most while heading the labor department.
"For the two of us, that is easy," Perez said of joining forces. "Because we were always united in our values."
And supporters say Perez, who brokered several high-profile disputes between management and labor unions as Labor Secretary, say he can do the same inside the Democratic Party.
Also read: Drama as Pastor Adeboye kisses, lauds wife
"Tom has an instinctive ability to be a dealmaker and consensus builder," Los Angeles Mayor Eric Garcetti said in an interview. "He's a really likable person. So this is not an election in which retribution is going to be elected against people who did support you."
But it will be much harder for Ellison supporters who don't know Perez personally to avoid discouragement.
"It's a loss for the DNC and the Democratic Party, not for Keith," said Eric Thut, the new executive director of Netroots Nation, one of the largest annual gatherings of progressives.
In the front of the ballroom where voting occurred Saturday, DNC members from both factions moved quickly to show unity. They cheered Perez and adopted a motion to record for posterity their vote as unanimous.
But in the back of the room, where members of the public were allowed to watch the debate, green-shirted Ellison supporters erupted in deafening chants of "no big money! Party for the people!" when the results were announced.
Perez can build credibility with those activists, progressives say — it will just take a lot of work that could be avoided if the party had chosen Ellison, who can also work rooms of major donors.
"The leaders of the Democratic Party missed an opportunity today," said Dan Cantor, the national director of the Working Families Party, a liberal group that has organized recent protests targeting both Democratic and Republican members of Congress.
"Since Inauguration Day, millions of people around the country have marched against Trump. Keith Ellison was uniquely qualified to transform that anger and fear into political power and organization," Cantor added.
And they worry the party will lose those activists forever if they're not made to feel that they have as seat at the table.
"Unless he figures out a way to start building a bridge to those people, we'll see the hashtag #DemExit trending on Twitter," said Jane Fleming Kleeb, the chairwoman of the Nebraska Democratic Party and a Ellison supporter.
In a parallel universe, liberals would be clamoring to have President Hillary Clinton appoint him Attorney General.
And in selecting Perez, who was the most liberal member of Obama cabinet, the party clearly solidified its left turn.
As a Latino civil rights attorney, bureaucrat, Brown University graduate, organized labor booster, and proud resident of uber liberal Takoma Park, Maryland, Perez is a clear break from the party's businesses-friendly previous chairs, Rep. Debbie Wasserman Schultz and Virginia Sen. Tim Kaine.
"I know that Tom Perez will unite us under that banner of opportunity," Obama said in a statement.
Perez also will have to get to work immediately to rebuild the party's infrastructure, which withered under Obama.
State parties have been neglected, while the party's national headquarters was demoralized by the publication last year of hacked emails that lead to the abrupt departure of chairwoman Wasserman Schultz.
"I would expect that in a year when you don't have the White House, at least 70 percent of that job will be related to raising money," said Henry Munoz, the DNC's longstanding finance chairman, who was re-elected Saturday.