WASHINGTON (Reuters) - “Expand the battlefield.”

FILE PHOTO: US Democratic congressional candidate Mikie Sherrill (C) speaks with people as she campaigns during the New Jersey State Fair in Augusta, New Jersey, U.S., August 12, 2018. Picture taken on August 12, 2018. REUTERS/Eduardo Munoz/File Photo

The Democrats’ mantra for seizing control of the U.S. House of Representatives took shape within weeks of President Donald Trump’s stunning 2016 White House victory.

Democratic strategists wanted to go beyond the traditional strategy of flipping Republican seats in swing districts. Now, they would also compete in more conservative areas, forcing Republicans to burn resources defending seats they considered safe.

It meant rolling the dice, gambling that a polarizing president would drive independent and moderate Republican voters away from his party’s candidates, gambling that Democrats would remain energized by antipathy towards him, gambling that history and a political map that had Republicans on the defensive would work in their favor.

In the fight for the House, Democrats were “starting the 2018 election cycle on offense,” Dan Sena, executive director of the Democratic Congressional Campaign Committee, wrote in a memo assessing the party’s chances days after Trump’s inauguration in January 2017.

On Tuesday night, the Democrats’ bets paid off with a projected win of at least 30 new seats, which would be seven more than the 23 needed to secure their first House majority since 2011.

Read More: For Democrats, U.S. House win moves Pelosi to center stage

“We owned the ground,” Democratic House leader Nancy Pelosi said as the takeover became clear. She credited the win to the party’s “dynamic, diverse and incredible candidates.”

Reuters reporters visited more than a dozen battleground House districts and interviewed candidates, campaign officials, strategists and voters to learn how Democrats laid the groundwork to capture the chamber. They also analyzed historical election trends and data from Reuters polling partner Ipsos.

In his memo, Sena offered an initial list of 59 Republican-held seats deemed flippable by the DCCC, the party organization that oversees House races. Democrats needed to take just over a third of them, an ambitious goal, but not unprecedented. Republicans would be defending dozens of districts where Trump either lost or won narrowly.

To fight on a much larger battlefield, Democrats needed “candidates with diverse profiles that fit unique, Republican-leaning districts,” DCCC Chairman Ben Ray Luján, a U.S. House member from New Mexico, wrote in a June 2017 memo to staff. “Look outside of the traditional mold to keep recruiting local leaders, veterans, business owners, women, job creators, and health professionals.”

By early this year, Democrats had broadened their target list to more than 100 battleground races where they felt they had competitive candidates.

Top targets were the 41 open Republican seats, including dozens vacated by incumbents who retired rather than seek reelection in districts where Trump is not popular. Many of those districts were won by Democratic presidential candidate Hillary Clinton or carried narrowly by Trump in 2016.

Besides the open seats, Democrats focused on 21 Republican incumbents in districts that also were closely contested in 2016. Republican-held districts with large minority populations were another priority, as were white, working-class districts that backed Barack Obama for president before swinging to Trump in 2016.

History suggested Democrats had a good shot for a “wave” election in the House – a power-shifting win with a turnover of dozens of seats. Those reversals typically occur when the president’s approval sits below 45 percent and the share of voters who believe the country is going in the right direction is below 40 percent.

Read More: Democrats to push for big infrastructure bill with 'real money' in 2019

For much of this year, Trump’s approval in Reuters/Ipsos opinion polls has hovered around 40 percent, and “right direction” sentiment has been around 35 percent. Exit polls showed similar sentiment among voters on Tuesday.

Slideshow ( 10 images )

The Democrats invested $2.5 million early in the campaign cycle to expand fundraising databases and hire digital strategists to boost online donations, according to figures released by the party.

By Election Day, the DCCC had raised at least $270 million - upwards of 20 percent more than its total in the 2015-16 election cycle. That allowed the party to make six-figure investments in 85 districts, including many once seen as safely Republican.

The committee also trained nearly 3,000 campaign workers and dispatched field organizers earlier than usual, including 20 in Republican-held districts before Democrats even had candidates in them. It also forged new partnerships with outside organizations to help recruit candidates and energize key voting groups.

Once Democrats had identified the districts they wanted to contest and the candidates they wanted to win them, party leaders sought to apply one of the big lessons of 2016 - don’t let Trump dominate the conversation. They urged candidates to focus on healthcare and economic security, issues that consistently registered high voter interest in polls.

“We urged our candidates to focus on the issues that are most important to voters,” DCCC Press Secretary Tyler Law told Reuters. “We just let Trump be Trump.”

A FLIP IN THE SUBURBS

Until Tuesday, voters in New Jersey’s 11th congressional district hadn’t sent a Democrat to the U.S. House of Representatives in nearly 40 years – but the seat was ripe for flipping.

Perched at the western edge of the New York City suburbs, the district has the kind of wealthy, well-educated, moderate Republicans who aren’t especially keen on Trump. In 2016, its voters backed him for president by less than 1 percent, a fraction of the margin they usually give Republicans in White House races.

And when 23-year Republican incumbent U.S. Representative Rodney Frelinghuysen announced in January that he would not seek re-election, the district slid into a coveted category for a Democratic Party eager to seize the U.S. House majority: an open seat.

The party nominated Mikie Sherrill, a centrist, first-time candidate with a resume party officials saw as a perfect fit for the district.

She was likely to attract college-educated women, a group shown in opinion polls as especially unhappy with Trump. And her background - former Navy helicopter pilot, former federal prosecutor, coach of her children’s sports teams - seemed sure to appeal to independent and moderate Republican voters.

On election night, Sherrill romped to victory over state assemblyman Jay Webber.

Sherrill, 46, campaigned mostly on kitchen table issues, such as health care, economic security and improving transportation infrastructure. She positioned herself as someone who would “fight back against Donald Trump” but made little mention of him on her campaign website or social media accounts.

Still, many who backed Sherrill had Trump on their minds.

Rick Haan and Martin Smith are the sort of lifelong Republican voters who had kept the district in the party’s hands since 1985 – successful, well-educated professionals who favor candidates in the small-government, fiscally conservative mold of former President Ronald Reagan.

Both are repelled by Trump’s bombastic rhetoric and nationalist politics and want a Democratic Congress to stand in opposition.

Slideshow ( 10 images )

“I won’t vote for anyone who isn’t against him,” said Haan, a 64-year-old business consultant.

“There’s only one issue,” said Martin, a retired lawyer, “and that’s getting back to a civil society.”

REVERSING THE“TRUMP SURGE”

Abby Finkenauer, daughter of a union worker and sister of a soybean farmer, was precisely the sort of candidate Democrats needed to flip Iowa’s 1st congressional district, a mostly white, culturally conservative, working-class swath of eastern Iowa.

Finkenauer, 29, ousted two-term Republican Representative Rod Blum, a wealthy businessman she painted as out of touch with working-class voters.

In 2016, Trump won the district because typically Democratic union members liked his economic populism and promises of job creation. To win them back, Finkenauer stressed her union roots: one ad featured her talking about how her father, a retired welder-pipefitter, would wring sweat from his belt after a day’s work.

In hundreds of appearances, many in union halls, Finkenauer promised to protect families’ health care and oppose any efforts to cut Social Security and Medicare healthcare programs for senior citizens.

“I decided to do this because it is so dang personal,” Finkenauer said, noting her family’s working-class roots at a gathering of union workers over burgers and hot dogs in Anamosa, population 5,500.

Nearly 40 percent of the district’s voters are independents, and it’s dominated by farmers and union workers employed at the John Deere factories in Dubuque and Waterloo and the Quaker Oats and General Mills plants in Cedar Rapids.

Like many Democrats who won Republican seats, Finkenauer outraised Blum, mostly with donations of $20 or less. She routinely criticized the Trump-backed tax-reform bill, which passed last year with Blum’s support, as favoring the wealthy over workers, a sentiment many voters echoed in interviews.

Blum’s campaign did not respond to requests for comment. In a recent debate, he dismissed Finkenauer’s tax-cut criticism: “Our economy is absolutely booming, if you haven’t noticed, and it’s due in large part to those tax cuts.”

But Finkenauer’s message resonated with union voters such as Robbie Frommelt, 28, a Cedar Rapids ironworker. He voted for Obama, then Trump, but has grown disillusioned with Republicans.

“I think the Democrats are more on the side of the workers,” Frommelt said in an interview days before the election, noting that many of his co-workers have told him they feel likewise. “A lot of the guys are going to switch back.”

STICKING TO THE SCRIPT

In South Florida’s Latino-dominated 26th congressional district, Democrat Debbie Mucarsel-Powell, an immigrant from Ecuador, followed Democratic leaders’ script of focusing mostly on “kitchen table” issues – and not Trump.

Campaigning in a district where half of constituents were born outside the United States, Mucarsel-Powell highlighted health care, pocketbook issues and the environment, a top concern in a district that stretches from the Florida Everglades to iconic Key West.

While the university administrator consistently painted her Republican opponent Carlos Curbelo as a strong supporter of Trump, she didn’t make Trump’s controversial immigration policies the chief focus of her campaign. In a district that backed Clinton by 16 points in the 2016 presidential race, Curbelo had worked hard to separate himself from Trump’s hardline stance on immigration.

So Mucarsel-Powell emphasized the issues where Curbelo was more closely aligned with the president. Time and again, she highlighted his vote to repeal the Obama health care law and his support for the Trump-backed tax bill, which she characterized as a giveaway to the rich that would have little benefit for the district’s working class voters.

“All you need to do is look at his voting record to see who he truly is,” said Mucarsel-Powell said of Curbelo. “Time and time again, he caved into his party,” she said, “and some of the most extreme members of his party.”

On Tuesday voters gave Mucarsel-Powell a narrow victory.

Curbelo knew he faced a challenge.

“The truth is this is a swing district,” Curbelo said about a week before the election, “and I am always ready for any outcome.”