This is the first of a three-part series on behind-the-scenes maneuvering for control of the Senate. The reporting on this series started in summer 2016.

On a cold day last winter, two retired FBI agents arrived in Wichita, Kan., on a research mission.

The team, according to senior Republican strategists in Washington and Kansas, had been dispatched by the National Republican Senatorial Committee (NRSC) to look into the background of Rep. Mike Pompeo (R), an ambitious conservative with an affinity for the limelight who was considering a primary challenge to Sen. Jerry Moran Gerald (Jerry) MoranLobbying world This World Suicide Prevention Day, let's recommit to protecting the lives of our veterans Hillicon Valley: Zuckerberg acknowledges failure to take down Kenosha military group despite warnings | Election officials push back against concerns over mail-in voting, drop boxes MORE (R).

Republicans had been stung by ultra-conservative candidates who had won primary elections in key states by upending more mainstream alternatives before ultimately losing their general elections.

Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellPelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Senate GOP aims to confirm Trump court pick by Oct. 29: report Trump argues full Supreme Court needed to settle potential election disputes MORE (R-Ky.) was intent on squashing those primary challenges and exerting a greater influence over his party — even in a red state like Kansas.

After the 2012 elections, McConnell vowed to “crush” Tea Party challenges in the 2014 cycle. He followed through on that promise, and the GOP subsequently captured control of the Senate. In order to retain the upper chamber, Republicans needed to keep to the same game plan.

ADVERTISEMENT

To squelch Pompeo’s interest in a costly and potentially nasty Republican primary, McConnell and his chief political lieutenant, NRSC Executive Director Ward Baker, set out to let the congressman know just what awaited him if he decided to run.

They orchestrated a classic good cop-bad cop routine: Political operatives working for conservative mega-donors Charles and David Koch, with whom Pompeo is close, urged the GOP legislator to stay in the House. Other allies from Washington to Wichita echoed that message.

Baker played the bad cop. A poll paid for by the NRSC showed Moran crushing Pompeo in a primary. Baker convinced two conservative groups that Pompeo might have turned to for money to make it clear the spigots were closed. And the retired FBI agents didn’t bother to cover their tracks; it would help the NRSC’s cause if Pompeo knew the campaign arm was preparing a thick binder of opposition research.

On April 25, Pompeo took himself out of the race, citing the lack of time to mount a strong challenge. He took thinly veiled shots at “legacy Republican leaders” who had discouraged him from running.

The effort to keep Pompeo on the sidelines in Kansas was just one move in a complicated match between McConnell and his Democratic counterpart, incoming Minority Leader Charles Schumer Chuck SchumerSenate Democrats introduce legislation to probe politicization of pandemic response Schumer interrupted during live briefing by heckler: 'Stop lying to the people' Jacobin editor: Primarying Schumer would force him to fight Trump's SCOTUS nominee MORE (N.Y.), as they made parallel efforts to claim control of the Senate in the 115th Congress.

When polls closed on Nov. 8, Democrats picked up two Republican-held Senate seats — short of the five they needed to win outright control of the chamber.

This is the story of how each party achieved those outcomes, the story of the battle for control of the Senate as it played across a national chessboard from New Hampshire to Nevada to North Carolina, based on interviews with more than two dozen senior strategists, pollsters, donors and Senate and campaign officials on both sides of the aisle.

Jitters on both sides

After boom-or-bust election cycles in recent years, both parties began the two-year stretch with jitters. They focused on seven states held by Republican senators that President Obama won twice — Ohio, Iowa, New Hampshire, Florida, Pennsylvania, Wisconsin and Illinois — along with a few second-tier Republican-held states, such as Missouri, North Carolina and Arizona, and two Democratic-held states, Nevada and Colorado.

And party leaders watched — and feared — the impact their respective party’s presidential nominees would have down the ballot. Donald Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE and Hillary Clinton Hillary Diane Rodham ClintonButtigieg stands in as Pence for Harris's debate practice Senate GOP sees early Supreme Court vote as political booster shot Poll: 51 percent of voters want to abolish the electoral college MORE were the two least popular presidential nominees ever chosen, a factor that would weigh on candidates running for Senate seats across the nation.

Republicans prepared for a difficult year, one in which they would find few opportunities to expand the map, while Democrats targeted their incumbents.

“We realized we were going to have a very large battlefield,” said Steven Law, a former McConnell aide who heads the American Crossroads family of outside organizations. “We knew we would be playing defense this cycle.”

From the beginning, Baker, the hard-charging and brashly blunt retired Marine who ran the NRSC, pushed his candidates to insulate themselves from a national tide. After studying Senate races from 2012 and 2014, Baker and his team came to two conclusions: First, that candidates with strong favorable and job approval numbers tended to survive waves, and second, that the party’s money would be best spent to influence races early.

“We had a philosophy that said you’ve got to get your favorable rating up to 50 percent, get your job approval rating as close to 50 percent as possible, and then keep it there all the way through the election,” said one Republican pollster intimately involved in early planning.

McConnell hatched his own plan to give incumbents ammunition for their reelection bids. McConnell gave members votes on issues they could sell back home: Sen. Rob Portman Robert (Rob) Jones PortmanMcConnell locks down key GOP votes in Supreme Court fight Romney undecided on authorizing subpoenas for GOP Obama-era probes Congress needs to prioritize government digital service delivery MORE (R-Ohio) sponsored a measure to tackle the growing opioid crisis, an issue also very important to Sens. Kelly Ayotte Kelly Ann AyotteBottom line Bottom line Bottom Line MORE (R-N.H.) and Pat Toomey (R-Pa.). Toomey got a vote on a bill to limit sanctuary cities. Sen. Roy Blunt Roy Dean BluntSocial media platforms put muscle into National Voter Registration Day Senate GOP faces pivotal moment on pick for Supreme Court This week: Supreme Court fight over Ginsburg's seat upends Congress's agenda MORE (R-Mo.) spearheaded legislation helping military families.

Prepping for rough waters

McConnell and Baker told GOP senators to take their reelection bids seriously. When Sen. John Boozman John Nichols BoozmanCOVID-19 relief talks look dead until September Senate GOP hedges on attending Trump's convention amid coronavirus uptick The Hill's Coronavirus Report: San Francisco Gay Men's Chorus Artistic Director Tim Seelig says choirs are dangerous; Pence says, 'We have saved lives' MORE (R-Ark.) turned in a subpar fundraising performance last year, the NRSC organized a major fundraiser to boost his cash on hand. Republicans sent messages to other members that they needed to begin planning for a tough environment early on.

Some, like Sen. John McCain John Sidney McCainCindy McCain endorses Biden: He's only candidate 'who stands up for our values' Biden says Cindy McCain will endorse him Biden's six best bets in 2016 Trump states MORE (R-Ariz.), took those warnings seriously. Others, like Blunt and Sen. Richard Burr Richard Mauze BurrRep. Mark Walker says he's been contacted about Liberty University vacancy Overnight Defense: Trump rejects major cut to military health care | Senate report says Trump campaign's Russia contacts posed 'grave' threat Senate report describes closer ties between 2016 Trump campaign, Russia MORE (R-N.C.), dragged their feet, a source of frustration for Republican leaders over the next two years.

Though presidential turnout would favor them, Democrats started the cycle in a dark period. They hadn’t anticipated the depth of their losses in 2014, when Republicans took back the majority. Unexpected defeats of incumbents like Sens. Kay Hagan Kay Ruthven HaganThe Hill's Campaign Report: Democratic Unity Taskforce unveils party platform recommendations Democrats awash with cash in battle for Senate The Hill's Campaign Report: Trump's job approval erodes among groups that powered his 2016 victory MORE (N.C.) and Mark Udall Mark Emery UdallThe 10 Senate seats most likely to flip Democratic presidential race comes into sharp focus Democrats will win back the Senate majority in 2020, all thanks to President Trump MORE (Colo.), two members popular among other Democratic senators, cast a pall over the caucus.

Two-thirds of the remaining 46 conference members had never served in the minority, and relinquishing power hurt. Some of the younger members even considered making a change at the top by ousting their leader, Harry Reid Harry Mason ReidThe Supreme Court vacancy — yet another congressional food fight Trump seeks to turn around campaign with Supreme Court fight On The Trail: Battle over Ginsburg replacement threatens to break Senate MORE (Nev.). Reid’s team heard those rumblings and successfully navigated around what could have been an ugly leadership fight.

Tom Lopach, the soft-spoken chief of staff to Sen. Jon Tester Jonathan (Jon) TesterPence seeks to boost Daines in critical Montana Senate race This World Suicide Prevention Day, let's recommit to protecting the lives of our veterans Filibuster fight looms if Democrats retake Senate MORE (D-Mont.) who took over the Democratic Senatorial Campaign Committee (DSCC), had to convince his members of the plausibility of the path back to the majority.

Along with those seven states Obama had won twice, strong Democratic recruits in states like Missouri, North Carolina and Kentucky could expand the map — and, if a political wave developed, put more states in play.

“The map was good for us, and the math was good for us,” one senior Democratic strategist said of the beginning of the cycle. “It was always part of our strategy to have the map be as big as possible, as long as possible.”

Both sides saw two states as easy Democratic targets from the beginning: In Illinois, Sen. Mark Kirk Mark Steven KirkLiberal veterans group urges Biden to name Duckworth VP On the Trail: Senate GOP hopefuls tie themselves to Trump Biden campaign releases video to explain 'what really happened in Ukraine' MORE (R) was virtually certain to lose. His improbable victory in 2010 came against a scandal-plagued Democrat in a good year for Republicans, and few believed he could overcome headwinds in such a Democratic state.

And in Wisconsin, Sen. Ron Johnson Ronald (Ron) Harold Johnson CIA found Putin 'probably directing' campaign against Biden: report This week: Supreme Court fight over Ginsburg's seat upends Congress's agenda GOP set to release controversial Biden report MORE (R) began his rematch far behind former Sen. Russ Feingold (D), whom he had beaten six years earlier. A Marquette Law School poll conducted in April 2015 showed just one-third of Wisconsin voters viewed Johnson favorably, and voters favored Feingold over Johnson by a 54 percent to 38 percent margin.

Even Baker, in private presentations with Republican lobbyists, said he didn’t think Johnson could win, according to donors who sat through NRSC presentations.

No Republican took his own reelection bid more seriously than Ohio’s Portman. He had been tearing up the fundraising circuit for months, and by early 2015, almost all of Portman’s campaign team was in place. Running for reelection in such a big state is difficult to begin with; to mitigate any potential drag from the top of the ticket, Portman set about building an infrastructure that would eventually rival the size of a presidential campaign’s swing state team, going so far as to recruit high school students to volunteer.

Still, Democrats were convinced Portman was vulnerable. Schumer especially focused his recruiting efforts on Ted Strickland, a former governor who was still popular despite his loss in 2010. On Feb. 25, Strickland announced he would challenge Portman, giving Democrats their first top-tier recruit of the cycle.

Reid’s big decision

Democrats were playing defense themselves in Nevada, where polls showed Reid’s favorable numbers were dismally weak. In March, Reid called Schumer to tell him he wouldn’t be running again, giving Schumer the head start in the race to replace Reid atop the Democratic caucus. Within hours, Schumer had sewn up the votes, and Sen. Dick Durbin Richard (Dick) Joseph DurbinTumultuous court battle upends fight for Senate McConnell focuses on confirming judicial nominees with COVID-19 talks stalled Senate Republicans signal openness to working with Biden MORE (Ill.), Schumer’s only potential rival, congratulated the next Democratic leader.

Reid left the caucus with a second strong recruit: In announcing his own retirement, he publicly backed Catherine Cortez Masto, a longtime protégé, as his chosen successor. Republicans held out hope that hugely popular Gov. Brian Sandoval would jump in the race, though he ultimately demurred; Rep. Joe Heck was the party’s second choice, but a strong candidate in his own right.

After becoming Democratic leader-in-waiting, Schumer threw himself into the fight for control of the Senate with renewed vigor. Schumer had run the DSCC in the 2006 and 2008 cycles, and even after leaving he maintained a constant presence at the committee. But now, he redoubled his involvement.

“It has always been clear to him that being majority leader is much preferable to being minority leader,” a Democratic Senate chief of staff said.

Through spring and summer 2015, Schumer, Reid and Tester sought out the strongest candidates they could find. Schumer and his daughter had dinner with Feingold and his wife, in hopes of convincing Feingold to make a comeback. Democratic leaders enlisted their own colleagues in the recruitment drives when necessary: A handful of Democratic senators called Hagan to urge her to mount a comeback attempt.

Sen. Patty Murray Patricia (Patty) Lynn MurraySenate Democrats introduce legislation to probe politicization of pandemic response Trump health officials grilled over reports of politics in COVID-19 response CDC director pushes back on Caputo claim of 'resistance unit' at agency MORE (D-Wash.) called Katie McGinty, a former Clinton administration official in Pennsylvania who now served as Gov. Tom Wolf’s chief of staff, to ask her to run against Toomey. Sen. Claire McCaskill Claire Conner McCaskillMomentum growing among Republicans for Supreme Court vote before Election Day Democratic-linked group runs ads in Kansas GOP Senate primary Trump mocked for low attendance at rally MORE (D-Mo.) facilitated meetings between the DSCC and Jason Kander, Missouri’s secretary of state and a veteran of the war in Afghanistan.

Both parties faced disappointments in the recruiting process. Hagan, who had lost a brutal campaign in 2014, decided against running again. In Colorado, one of a small handful of races where Republicans hoped to put Democrats on defense, prosecutor George Brauchler was a week away from entering the race against Sen. Michael Bennet Michael Farrand BennetOVERNIGHT ENERGY: House Democrats tee up vote on climate-focused energy bill next week | EPA reappoints controversial leader to air quality advisory committee | Coronavirus creates delay in Pentagon research for alternative to 'forever chemicals' Senate Democrats demand White House fire controversial head of public lands agency Next crisis, keep people working and give them raises MORE (D) before he told top Republicans he wouldn’t run.

Some Democrats bemoaned Hagan’s exit in a tough state where the party faced a weak bench. But EMILY’s List, the group that backs pro-abortion rights Democratic women, had a replacement in mind: Deborah Ross, a 53-year-old former member of the state legislature. Ross, who impressed Democrats with her diligent work introducing herself to senators and party donors, formally entered the race in October 2015.

Year of the outsider

Even beyond the traditional battleground states, Republicans saw worrisome signs that some of their members could face trouble. In October, more than a year before Election Day, One Nation, an outside group tied to the Crossroads network, began running advertisements touting Blunt’s work on behalf of military families. Trump was surging among Republican voters sick of the political establishment, and some worried that Blunt — a longtime Washington insider with a family full of lobbyists — could be vulnerable in a climate that favored outsiders.

“You could see the vulnerability a long way away,” said Josh Holmes, a Republican strategist with close ties to McConnell.

Together, One Nation and the Senate Leadership Fund, another Crossroads entity, had budgeted $4 million to protect Blunt, who defied some pundits’ predictions and kept his seat.

In fall 2015, Democrats scored another recruiting win when Gov. Maggie Hassan said she would challenge Ayotte in New Hampshire. Republicans in Hassan’s legislature had held up the state budget for weeks, delaying Hassan’s entry into the race. But both candidates entered the contest with strong favorable ratings and healthy job-approval numbers, setting up what would become one of the year’s most expensive contests and one of the Democratic bright spots on Election Day.

Supreme Court clash

A final race came into play in early 2016, when Supreme Court Justice Antonin Scalia passed away unexpectedly at a ranch in Texas. Sen. Chuck Grassley Charles (Chuck) Ernest GrassleyCollins says she will vote 'no' on Supreme Court nominee before election The Hill's Morning Report - Sponsored by Facebook - Trump, GOP allies prepare for SCOTUS nomination this week Gardner signals support for taking up Supreme Court nominee this year MORE (R-Iowa), the chairman of the Senate Judiciary Committee, declined to hold hearings on Obama’s nominee to replace Scalia.

Grassley’s refusal to advance Judge Merrick Garland’s nomination served as a galvanizing moment for some Democrats in the Senate. Outraged by what they saw as grossly political obstructionism, Democrats turned their attention to an aptly named rival to highlight what they saw as the Republican’s weakness: Patty Judge, the former lieutenant governor. Judge would spend virtually her entire campaign reminding voters that Grassley was holding open a seat on the Supreme Court. Grassley ended up winning by 25 points.

The right eyes McCain’s seat

McCain had faced a primary contest in 2010, and he expected another. His favorable ratings were low in internal surveys, driven largely by weak numbers among Republicans.

State Sen. Kelli Ward, an archconservative from Lake Havasu, quit her legislative seat to mount a bid against the 2008 Republican presidential nominee.

The GOP establishment machine attacked Ward relentlessly, and McCain easily won his primary.

In Alabama, Sen. Richard Shelby (R) presented a prime target for a conservative challenger. Shelby, who had been in office for 30 years, had built a legacy of bringing appropriations projects back to his state. If Trump’s drain-the-swamp message would impact any Senate Republicans, someone like Shelby would be vulnerable.

But Shelby had also built a massive, $18 million campaign war chest unrivaled by any of his fellow senators. Beginning in December, he used that stockpile to blast his main rival, Jonathan McConnell, with negative advertising. Shelby won his March primary with 65 percent of the vote, on the same day Trump captured Alabama’s primary with 43 percent.

Conservatives ultimately took a pass on challenging Boozman in Arkansas, whose campaign fund was just a fraction of the size of Shelby’s.

Primary issues on the left

Democrats faced their own primary headaches.

In Pennsylvania, former Rep. Joe Sestak wanted a second shot at Toomey, to whom he had lost by just 2 points in 2010. But Sestak and Schumer had a contentious history; Sestak had run an unorthodox campaign in 2010, one that Democrats believed cost him a winnable race, and he showed no interest or inclination toward heeding the DSCC’s advice.

“We were going to need a campaign that would work with us and that we could work with,” a top Democratic Senate strategist said later. The DSCC was unwilling to commit the tens of millions required to beat Toomey if their nominee wouldn’t run a top-notch campaign.

Most Democrats in Washington mobilized behind McGinty. EMILY’s List and union groups, along with the DSCC, helped McGinty win the Democratic primary by an impressive 10 percentage points, but at the cost of millions of dollars.

Some Democrats watched incredulously as EMILY’s List spent millions on behalf of another candidate, Rep. Donna Edwards, in Maryland’s primary. The state would almost certainly elect whichever Democrat came out of the primary, they believed, so why waste limited resources on Edwards over Rep. Chris Van Hollen, who had an equally liberal voting record and close ties to Democratic leaders?

Van Hollen won his primary too, and EMILY’s List quietly let it be known that the money they had spent on Edwards had almost entirely come from one donor — investment manager Donald Sussman — who earmarked his donation for Edwards.

The battlefield takes shape

By April 2016, the parties broadly agreed on the shape of the battlefield over which they would fight in November: Republicans had little chance of defending Kirk and Johnson, both parties believed.

Democrats would target the five other states Obama had won where Republicans held Senate seats: Ohio, Pennsylvania, New Hampshire, Florida and Iowa. The party had slim, but real, shots at vulnerable GOP incumbents in Missouri and North Carolina. And Republicans had a strong chance to win back Reid’s seat in Nevada.

But neither McConnell nor Schumer was completely content with their candidates — and both men had an ace up their sleeves they hoped would shake up the battle for control.

Tomorrow, Part 2: The Donald Trump effect