When Hakeem Jeffries's House colleagues elected him Democratic Caucus chairman in November, they dropped the four-term Brooklyn Representative into the middle of one of his party’s biggest battles.

He faced the longest shutdown in U.S. government history, fighting back against Trump and his Twitter hammer and keeping his flock together and on message. He’s got 40 new members getting to know each other, angling for committees and working on legislative wish lists. And he has to balance the instincts of moderates who want to cut deals with insurgents who want to breathe fire.

Just two years ago, he was a back-bencher in the minority party and flirting with a run for mayor. Now, at the age of 49 and in his fourth term, Jeffries is the fifth-ranking Democrat in a newly energized majority.

Allies say he got there by honing the Democrats' message to a sharp point—and using sharp elbows for rivals who get in the way.

“The exact right person at the right time, given the diversity we have in our caucus,” said Rep. Greg Meeks, whose district includes parts of Queens and Nassau counties.

The shutdown was his first test. Jeffries and Democratic leadership forced Trump to back down because they knew they had the politically defensible position: open government, then we’ll talk.

“We’re not willing to pay a $5.7 billion ransom note for a medieval wall,” Jeffries said at press conference on the shutdown’s 33rd day.

“The government shutdown needs to end in order for us to have a responsible, mature conversation about border security.”

Though some Democrats were growing restless with the standoff, Jeffries convinced nearly the entire caucus to hold firm.

“It’s unprecedented,” Meeks said. “The longest shutdown in the history of our country…and yet he’s utilizing the skills that he obtained from the state legislature to his years here—and had to learn quickly on the job.”

The leadership job itself was a surprise: It came open when Queens Representative Joe Crowley lost his primary last year to Alexandria Ocasio-Cortez.

Colleagues say Crowley counseled Jeffries on how to beat Oakland Representative Barbara Lee, who announced that she wanted the job three months before Jeffries did.

Crowley declined an interview for this story. But he praised Jeffries after House Democrats voted in November.

“The country’s in great hands, the caucus is in great hands with Hakeem,” Crowley said. “One of the quickest wits in the House today.”

Meeks also encouraged Jeffries to run.

“When you see someone that has the ability and talent of Hakeem Jeffries, you push ‘em,” he said.

The race echoed the ideological divisions in the party. Lee is a hero to progressives—the only member to vote against open-ended military action after the 9/11 attacks. Jeffries is also a member of the progressive caucus, but one who raises campaign money from Wall Street and the real estate industry, and supports charter schools.

Jeffries has co-sponsored Medicare-for-all legislation, but said he favors a stronger Affordable Care Act. He’s introduced bills to help released felons restore their voting rights, advocated to make it easier for artists to enforce copyright claims and tried to ban the use of chokeholds. He earned an "A" rating on one progressive group’s scorecard.

Jeffries beat Lee by ten votes, with support from the new, centrist freshmen in formerly red districts.

Activists like Cenk Uygur of the Young Turks—with his 4.2 million YouTube followers—were angry that Lee lost.

“They denied her that leadership role,” Uygur said on his November 28th show, “so they could put Hakeem Jeffries in there to buckle to Donald Trump. Welcome to the new Democratic majority.”

Jeffries declined an interview for this story.

Allies say he climbed so quickly because he knows what it’s like to be stepped on. He started out as a corporate lawyer with a master’s degree from Georgetown and a law degree from NYU. In 2000, he challenged veteran state Assemblyman Roger Green, and lost.

Two years later, he thought about challenging Green again—only to learn his home had been redrawn one block outside of Green’s district.

New York Assemblyman Walter Mosley is a friend, who won Jeffries's seat when Jeffries left for Congress. He says the loss made Jeffries stronger.

“You might not get it done the first time, but ultimately, if you’re persistent,” Mosley said, “and the people around you believe in what you’re doing... you’ll ultimately carry out your goals. What he did learn is that politics is a contact sport.”

Jeffries won the race to replace him in the Assembly after Green lost a run for Congress in 2006.

By 2012, it was Jeffries who was eyeing a seat in Washington, the one held by Representative Ed Towns for 30 years. Towns retired rather than face the challenge.

Under Republican control, Jeffries was a pitbull on the House Judiciary Committee.

“It’s a reckless legislative joyride designed to crash and burn,” Jeffries said during a July 2016 hearing about Hillary Clinton’s private email server. “It’s a sham.”

But advisors say he was restless in the minority. In 2015, he floated his name as a possible candidate against Mayor Bill de Blasio, and was still considering a run at City Hall if Democrats failed to win back the House last November.

Since then, he’s played his cards carefully, ducking internal party warfare. When Pelosi was facing a revolt by some Democrats, Jeffries declined to say if he’d help her gather the votes she needed for Speaker.

“Well I continue to support leader Pelosi,” Jeffries said at the time. “She can count on me as one of 218 votes. And that’s all I’ll say on that issue.”

New Jersey Representative Josh Gottheimer is a moderate Democrat who is active in the bipartisan Problem Solvers’ Caucus.

“He understands the importance of making sure that we work together,” Gottheimer said of Jeffries. “That we recognize that we all come from different places. And that what’s most important is that we govern.”

One example: Gottheimer says Jeffries worked with the White House and the caucus on a prison reform bill. “So Jared Kushner came with Van Jones and Grover Norquist. They all came to the Caucus.” Trump signed the bill into law and both liberal and conservative advocates claimed victory.

Brooklyn Representative Yvette Clarke says progressives watched Jeffries carefully during the shutdown fight, and he passed the test.

“He recognizes the diversity of the Democratic Caucus and he’s speaking to each us to make sure that our strength and our unity is standing firm,” Clarke said. She believed criticism of Jeffries is less about his politics, and more about disappointment Lee lost the chairman race.

But they’re still watching to see if he’ll support big new progressive ideas like Medicare-for-all, tuition-free college or a Green New Deal.

And if Jeffries doesn’t deliver? Politico has reported at least one group is considering a 2020 primary challenge.