The House Judiciary Committee was about to publicly debate articles of impeachment against the President, but on December 11, behind closed doors, the House speaker had a list of grievances to air against her members.

At a meeting with party leaders, the California Democrat was angry at Rep. Steve Cohen, an outspoken Tennessean, according to sources familiar with the meeting. The previous day Cohen had preempted Pelosi and six committee chairs set to announce the articles of impeachment by flashing two fingers to reporters -- signaling there would be just two, not three.

And Pelosi was once again perplexed by the Judiciary Committee, a partisan panel with more than a few publicity hounds, who had frequently pushed to go further than the broader Democratic caucus wanted on impeachment. Now the committee had decided to hold an evening's worth of five-minute opening statements for all 41 lawmakers. Pelosi was worried that Republicans would drag Democrats into the mud.

It was pointed out that the five-minute allotments were down from the 15 minutes members got during the Nixon impeachment proceedings, but that did little to assuage the speaker.

So Rep. Hakeem Jeffries, the House's No. 4 Democrat and a Judiciary member, leaned forward, turned to the speaker and reassured her that the hearing would be serious and solemn.

"There will be no bucket of chicken moments," said Jeffries, a reference to a Cohen stunt months earlier, when he ate Kentucky Fried Chicken at a hearing that Attorney General William Barr had refused to attend. Jeffries' comments appeared to assuage Pelosi's concerns, according to two sources in the room.

Over the next three days, Pelosi watched, even as the next hearing, on December 12 went late into the night. When House Judiciary Chairman Jerry Nadler suddenly gaveled it out , pushing the vote until the next morning, the public was surprised, along with Republicans on the panel. But Pelosi was not. She had signed off on the move, according to sources familiar with the conversation.

That night she called Nadler and congratulated him. Democrats on the committee had risen to the occasion in presenting the party's argument to the nation in a sober manner.

"That was magnificent," she said, according to sources.

Six days later, the House voted to impeach a President for the third time in US history, almost entirely along party lines.

The process that played out tested the leadership and political skills of both Pelosi and her Republican counterpart, House Minority Leader Kevin McCarthy of California. Pelosi's biggest challenge was keeping the disparate wings of her caucus together. McCarthy's was finding an effective defense at a time when the White House's messaging strategy consisted largely of the President's tweets, and a handful of Republicans flirted with backing impeachment.

The story of how the two of them navigated the impeachment of President Donald Trump and kept their caucuses unified is based on interviews with more than three dozen lawmakers, aides and others familiar with the effort, many of whom requested anonymity to speak candidly. The sources described how Pelosi went from an impeachment skeptic to its conductor, and how McCarthy designed a Republican defense, ultimately resulting in the most partisan impeachment in modern American history.

'Like a dam breaking': How Pelosi got behind impeachment

U.S. Speaker of the House Rep. Nancy Pelosi (D-CA) speaks during her weekly news conference December 5, 2019 on Capitol Hill in Washington, DC. Speaker Pelosi discussed the impeachment inquiry against President Donald Trump.

Though there have always been a handful of Democrats willing to impeach Trump, any real attempt to do so was going to have to wait for special counsel Robert Mueller's report . But when its inconclusive results came out on April 18 , the Democratic caucus was split on what to do.

While the report described potential episodes of criminal behavior by Trump related to obstruction of justice, it found no evidence on the key question of whether the Trump campaign had conspired with the Russians during the 2016 campaign.

The House Judiciary Committee then launched hearings based on the report -- and ran into a total blockade directed by Trump, who said , "We're fighting all the subpoenas." The panel fought Barr for the unredacted version of the report.

The attorney general didn't show up for his hearing. Cohen brought his bucket of chicken, a one-off move he thought appropriately highlighted Barr's contempt for Congress. Democrats went to court.

US Congressman Steve Cohen, Democrat of Tennessee, eats chicken during a hearing before the House Judiciary Committee on May 2.

A pivotal meeting came on May 20, when Pelosi met with members of the House Democratic leadership to determine the next steps. The factions became clear: Reps. David Cicilline of Rhode Island, Jamie Raskin of Maryland and Joe Neguse of Colorado -- all members of the Judiciary Committee -- were in favor of opening impeachment proceedings, according to two sources in the room.

But Pelosi and her allies -- Reps. Rosa DeLauro of Connecticut, Ben Ray Luján of New Mexico, Jeffries of New York and Cheri Bustos of Illinois -- were not on board. Bustos, the chair of the Democratic Congressional Campaign Committee, charged with defending the House majority, wanted to "let the Mueller stuff go," according to the two sources.

One of Pelosi's favorite sayings is a quote from Abraham Lincoln: "Public sentiment is everything." She's known in private meetings to gesture to a portrait she has of the 16th president and recite it. And at that point, the public had failed to be convinced.

The meeting was soon reported on, and the tensions surrounding Pelosi and the Judiciary Committee spilled into public view. Nadler was caught in the middle. While he had yet to publicly back an impeachment inquiry, he privately pushed Pelosi to change course and open one. The Judiciary members on Pelosi's leadership team -- Jeffries, Cicilline, Neguse and Raskin -- played a form of shuttle diplomacy between the opposing sides.

Another crucial moment came on July 24, when Mueller testified for seven hours before the House Judiciary and House Intelligence committees. While the former FBI director confirmed damaging information about the President, he also gave what were often halting and stilted responses that did not deliver Democrats the damning, dramatic moment they were seeking.

Former Special Prosecutor Robert Mueller listens while testifying before Congress.

Republicans crowed that impeachment was dead, while Democrats privately acknowledged they had missed an on-ramp.

Soon after, Nadler announced an impeachment inquiry into Mueller's allegations. In House court filings, Pelosi backed it. But she repeatedly refused to say publicly that the House had opened one.

Yet, unknown at the time, the day after Mueller's testimony, Trump would give Democrats the fodder they would need to impeach him.

During a private call on July 25, Trump pressured Ukrainian President Volodymyr Zelensky to announce investigations into Joe Biden and his son Hunter, and to look into a conspiracy theory that Ukraine had interfered in the 2016 US election. A government intelligence official heard about the call and filed a whistleblower complaint.

When the complaint became public in September, House Democrats suddenly had a case that the President had used his official office for his own personal benefit.

Over three days, more than 75 House Democrats came out in favor of an impeachment inquiry, pushing the number above a majority in the House. Seven freshmen Democrats with national security backgrounds representing swing districts called to tell Pelosi they were going to publish an op-ed in The Washington Post advocating an impeachment investigation, according to multiple sources. She thanked them and said it would resonate with the caucus.

"It was something that we all thought was wrong," Rep. Gil Cisneros of California, one of the op-ed's co-authors, told CNN. "We needed to speak up."

Raskin, a former constitutional law professor who had pushed for impeachment proceedings for months, said the op-ed was "like a dam breaking."

"You could just feel all the momentum headed in this direction," he added.

The article published on September 23. The next day, Pelosi announced the impeachment inquiry. Since she had not yet seen the whistleblower complaint, it was a leap of faith-- one that would play out over the next 85 days.

'That was kaboom': How the investigation uncovered a broad campaign

House Intelligence Committee Chairman Adam Schiff (D-CA) looks on during a weekly news conference held by House Speaker Nancy Pelosi (D-CA) on October 2, 2019.

On the evening of September 25, Democrats and Republicans on the House Intelligence Committee sat across from each other in the committee's secure hearing room in the basement of the Capitol complex to read the whistleblower complaint.

The document added context to the transcript of the President's call with the Ukrainian President, which had been released earlier that day, and it accused Trump of pressuring Ukraine to interfere in the 2020 presidential election by investigating his political rivals.

Sources in the room said lawmakers sat in silence while digesting the complaint.

"You could have knocked us over with feathers as we sat there and read it," said Rep. Jim Himes, a Connecticut Democrat on the committee.

Yet going forward was not without risk. House Intelligence Chairman Adam Schiff and the leaders of the inquiry were embarking on an investigation without knowing what materials they could obtain, given the administration's previous stonewalling, and they risked having an impeachment inquiry devolve into a protracted legal fight with the White House.

Pelosi had tapped Schiff and the chairs of the Oversight and Foreign Affairs committees to lead the impeachment investigation, after the three committees had already started the outlines of a Ukraine probe months earlier.

But the move sidelined the Judiciary panel, which traditionally leads impeachment inquiries. For many on Capitol Hill, it wasn't a major surprise, especially in the wake of the committee's September 17 hearing with Corey Lewandowski that made the committee's investigation look like a sideshow, even while confirming some incriminating events involving the President. Some Judiciary members were privately more confident that a closed-door investigation by the trio of panels would be more effective.

Over the next two months, the committees investigating Ukraine uncovered reams of useful material, deposing 17 officials, who detailed a months-long campaign in Ukraine directed by Trump and led by Rudy Giuliani, his personal lawyer.

The Intelligence Committee quickly got its first break, when its first witness appeared behind closed doors.

Kurt Volker had resigned from his role as US special envoy for Ukraine on September 27, a day after the whistleblower complaint became public. Less than a week later, Volker appeared in the House Intelligence Committee's secure facility to testify behind closed doors.

Former US Special Envoy for Ukraine, Kurt Volker, testifies during the House Intelligence Committee hearing.

He brought with him a coup for Democrats. Text messages Volker had exchanged with Giuliani, US diplomats and a Ukrainian political aide showed how Volker and US Ambassador Gordon Sondland had urged Ukraine to announce an investigation into the 2016 election and Burisma, the Ukrainian energy company that had hired Hunter Biden. They also showed that a US diplomat, Bill Taylor, had issued a stark warning that US security aid was being conditioned on the investigation, something Taylor called "crazy."

One Democrat said the investigation would "have been screwed" without Volker's text messages, which the lawmaker said "pointed the way to Taylor and others."

Democrats' successes continued as witnesses defied the administration and testified under subpoena. First Marie Yovanovitch, the former US ambassador to Ukraine who had been recalled from her post earlier in the year. Then Taylor. Then Lt. Col. Alexander Vindman, who hadlistened in to the July 25 call between Trump and Zelensky.

Democrats also looked outside the government for documents, issuing subpoenas to phone companies to obtain valuable call logs of Giuliani and others, though the decision to list the calls of GOP Rep. Devin Nunes of California and a conservative journalist sparked Republican accusations that the investigation was being used to smear Democrats' political opponents.

When the public hearings began, Taylor dropped a bombshell in his opening statement: A staff member had told him about a call he overheard in which Trump had asked Sondland for confirmation that Ukraine would move forward with the investigations.

That staffer, David Holmes, appeared behind closed doors two days later, bringing with him testimony that would become a staple of Schiff's closing statements -- that Trump cared only about the "big stuff" that benefited him, like the investigation into the Bidens.

"That was kaboom -- we didn't see that coming," said a third Democrat on the Intelligence Committee. "That morning, when we got his opening statement, it was like, holy s---."

'We were on our own': Republicans struggle as allegations pile up

House Minority Leader Kevin McCarthy (R-CA) speaks during his weekly press conference at the U.S. Capitol on November 21.

While the Ukraine scandal galvanized House Democrats to support impeachment proceedings, it equally flummoxed their Republican counterparts. For days, as new information about alleged misdeeds by the Trump administration mounted, rank-and-file Republicans found themselves lacking the most valuable currency of all to fight back: information.

Requests to the White House went unanswered, according to sources familiar with the matter. Republican leadership, while unified in their defense of Trump, found themselves more often than not without firm answers.

"It felt like we were on our own forever," one House Republican told CNN. "In reality it was probably only for a few days, but we had no answers, and every time we turned around we had cameras in our faces."

With their members in the lurch, and the White House unresponsive, McCarthy decided to go on offense.

Back in his district in Bakersfield, California, McCarthy was walking his dog Mac, an Australian shepherd, and calling members of his conference. With the help of a senior staffer, he started drafting a letter to Pelosi by phone, calling for the impeachment inquiry to be suspended until 10 specific process questions were answered.

For most, the letter was a blip -- something Pelosi ignored. But for McCarthy, it set the tone for his conference.

As the White House struggled to respond and Republican senators dodged cameras, House Republicans started fighting back, accusing the Democrats of an unfair process.

"You watched the senators kind of go dark. You watch people in the White House go dark," McCarthy told CNN in an interview. "And I took a group of us who've been through this fight before -- we're going to lean in."

Republican complaints over process were mocked by Democrats, who said it only proved they couldn't fight on the substance. But inside the Republican conference, it resonated. For the most skittish members, it was the process that turned them wholly against the Democratic effort.

McCarthy's strategy to focus on process also gave top House Republicans something to talk about on television. The substance of what they said was important, but so was the fact that they were willing to show their faces.

Rep. Steve Scalise of Louisiana, the number two House Republican, made the rounds on the Sunday news shows. He also started to have members on the Intelligence Committee brief others on the substance of the closed-door depositions.

"What I wanted to do is get the facts to our members as quickly as possible so that everybody can stay focused on what really happened," Scalise told CNN.

But just as Republicans felt like they were gaining some traction, on October 17, acting White House chief of staff Mick Mulvaney admitted at a White House news conference that there was a quid pro quo, directly contradicting what Republicans had been hammering for days.

One Democrat who watched the news conference, while standing beside some Republicans inside the Intelligence Committee's secure facility, said Mulvaney left some of them "cussing" under their breath. Another said Republicans stared impassively at Mulvaney.

In the hours that followed, GOP House leaders worked to calm concerned members and to ensure that Mulvaney issued a walk-back statement in short order.

Not long afterward, McCarthy made a key decision by significantly expanding the role of Rep. Jim Jordan of Ohio, a proven knife fighter on behalf of Trump who'd had no shortage of run-ins with McCarthy and GOP leaders in past Congresses. Jordan was added to the Intelligence Committee for the public hearings, where he played a key role pushing back against Democrats.

By the time impeachment kicked into full gear in November, it had served as a prescient play. Jordan, who Trump deeply respects and likes, was inside the tent.

'The process matters': Why moderate Republicans opposed impeachment

House Minority Leader Kevin McCarthy, Republican of California, holds a press conference on Capitol Hill in Washington, DC, December 10, 2019.

While the Democrats gathered incriminating, corroborating evidence during the closed-door depositions and hearings, something else was happening on the Republican side. Their process arguments were, in fact, having an effect on the few Republicans left in the conference who would consider breaking from Trump.

The group wasn't large -- various Republicans pegged it at somewhere between five and eight lawmakers -- but they were, in fact, concerned by Trump's actions.

One of them was Rep. Will Hurd, a swing district Republican from Texas who had already announced he wouldn't seek reelection and had been sharply critical of Trump in the past.

One Republican member recalled closely watching Hurd during the proceedings, worried which way he would come down. Yet each step of the way, whether it was Schiff interrupting GOP questions or the Democratic counsel trying to lead witnesses toward conclusions, the GOP lawmaker could see Hurd chafe. The leaks from the closed-door depositions and Democrats' overt protection of the whistleblower, including that Schiff's staff had had contact with the individual, all sat poorly with Republicans who otherwise may have been inclined to support the Democratic effort, according to sources.

That idea was echoed by Rep. Brian Fitzpatrick of Pennsylvania, one of the few undisputed swing district Republicans remaining in the House. Fitzpatrick was more than willing to buck his party. He had serious issues with Trump. But the former FBI agent was infuriated by the process pursued by Democrats.

"It was a serious allegation that was handled in a fundamentally unserious manner," Fitzpatrick told CNN.

One morning, Rep. Seth Moulton, a Massachusetts Democrat, walked up to GOP leader McCarthy in the House members' gym.

"You guys are full of s---," Moulton says he told McCarthy, going on to repeat the expletive-laden phrase as he called out Republicans for fighting on process as opposed to the substance of the allegations. Republicans, Moulton continued to McCarthy, knew full well Trump was "breaking the law" when it came to Ukraine.

McCarthy, keenly aware of where his moderate members stood precisely because of the process issue, says he smiled.

"You'll regret that in the end because you'll see the process beat you," McCarthy shot back.

It didn't hurt that Republican money started flowing. Over five days in November, the American Action Network, an outside GOP group, spent more than $7 million in a mix of digital and television ads across 37 districts -- much of them attacking Democrats from districts Trump had won in 2016.

"Seeing that come across let everyone know, hey, people have our backs on this," said one Republican.

'It was not irrelevant': The debate over the articles of impeachment

House Speaker Nancy Pelosi next to House Judiciary Chairman Jerry Nadler, Democrat of New York, announces articles of impeachment for US President Donald Trump.

By Thanksgiving, everybody seemed to have an idea about how to impeach the President. Rep. Mary Gay Scanlon of Pennsylvania, the Judiciary Committee vice chair, said that even a grade-school classmate had passed along suggestions. But everyone knew whose decision it was.

As her caucus debated, Pelosi had both the weight of the Constitution and a key constituency in mind, the moderate Democrats, who were firm in what they wanted: two articles, abuse of power and obstruction of Congress, both narrowly focused on Ukraine.

"Like in any place of business, you don't get any credit for having an idea and not telling anyone," Rep. Elissa Slotkin of Michigan told CNN. "So we communicated what we thought would be most helpful."

On December 4, Pelosi held a rare Wednesday meeting with her full leadership team. There, three of her top four deputies -- Majority Leader Steny Hoyer of Maryland, House Whip Jim Clyburn of South Carolina and Jeffries, the Democratic caucus chair -- presented the case for obstruction of justice to be included in the articles of impeachment, according to two sources. One view was that the Mueller report laid out in detail multiple instances where the President obstructed justice, and if the House didn't act, Trump's actions might be viewed as somehow tolerable.

"The argument that I made was that we ought not to allow the Mueller report to be characterized by Republicans as irrelevant," Hoyer told CNN. "It was not irrelevant. It did make serious findings, which were mischaracterized by Attorney General Barr in an effort to deflect the very serious implications of the Mueller report."

The next day, Pelosi announced that the House would draw up charges.

Hours later, another debate played out in a meeting with the six committee chairs investigating the President, according to sources. Nadler and other committee chairs advocated including charges of obstruction of justice, but Schiff and Ways and Means Chairman Richard Neal of Massachusetts supported two articles -- obstruction of Congress and abuse of power.

The moderates got their wish. There were two articles.

On December 12, there were no chicken buckets at the Judiciary Committee's hearing. Nadler had a firm grip on the gavel. The next day, nearly three months after Pelosi announced the inquiry, the panel voted to approve the articles of impeachment in under eight minutes.

This story has been updated.