Democrats laid the foundation for their midterm victory in the suburban districts that Hillary Clinton won two years ago, but the true margin of their House majority came in districts that traditionally tilt right.

Almost half the 30-plus seats Democrats won came in Republican-held districts where President Trump prevailed in 2016, and with ballots still being counted in several more races, that share might grow.

Moreover, combined with the seats they already held in Trump territory, Democrats are on track to start the new Congress in January holding about 30 districts where the president won.

That’s a large degree of political exposure, given that the size of their House majority will be about half that when the final races are called, and it’s a dynamic that has already prompted a debate within the party about the direction Democrats should chart over the next two years.

They now must decide how to govern: Go bold, brandishing an aggressive liberal agenda that tells voters what Democrats stand for and what to expect from their eventual presidential standard-bearer in 2020; or play it safe with a disciplined approach that doesn’t scare off independent voters ahead of the battle for the White House.

The party’s more liberal groups have already begun lobbying the Democratic leadership to push for a more aggressive agenda. The Progressive Change Institute built a database of Democratic candidates on a wide span of issues including the single-payer proposal for a national health plan built around Medicare and candidates’ stances on corporate PAC donations.

Almost 65 percent of the incoming freshman class of House Democrats supports Medicare-for-all, expanding Medicare or expanding Social Security, according to the liberal nonprofit group, which considers those three positions the “tip of the spear” for economic progressives.

But in a familiar refrain from internal debates of the past 30 years, some Democrats fear that an agenda that is too aggressive will scare off some of the independent voters who broke heavily in their direction this fall, endangering both the 2020 presidential nominee and the dozens of incumbents running two years from now in Trump-leaning districts.

“For Democrats to maintain and expand this near-majority advantage, they must craft a broadly appealing agenda that brings or keeps independents and less-committed partisans — the majority of whom call themselves ‘moderate’ — under the tent,” Anne Kim and Will Marshall of the Progressive Policy Institute wrote in a study released this week.

In an election-eve survey conducted with Expedition Strategies, they found that 48 percent of voters considered themselves to be Democrats or independents who lean Democratic, a comfortable distance ahead of the 39 percent of voters labeling themselves Republicans or centrists who lean Republican.

Overall, 51 percent of voters considered themselves “weak partisans,” including 31 percent who call themselves independent. Kim and Marshall assert that these voters are the decisive set who will determine the long-term direction of the country in the presidential election.

“The next two years present a do-or-die chance for progressive leaders to build upon and solidify their governing majority in Congress and, potentially, to recapture the White House,” they wrote.

House Minority Leader Nancy Pelosi (D-Calif.) faces opposition from some Democrats in her bid to become speaker again, but the objectors are either veteran incumbents who have had personal disputes with her or hail from the incoming class of mostly younger candidates who are largely in favor of a new generation of leadership taking the reins.

Pelosi, who has no announced opponent, has signaled that the opening weeks of next year would be focused on many of the kitchen-table issues on which Democrats campaigned, such as lowering the cost of prescription drugs and reasserting the guarantees prohibiting insurers from driving up costs because of individuals’ preexisting medical conditions.

The question is where the party goes after that, how boldly, how liberally.

This issue has ripened in the race for chairman of the Democratic Congressional Campaign Committee, the caucus’s political arm that will be tasked with defending the majority in 2020.

Rep. Cheri Bustos (D) has made the fact that her western Illinois district narrowly voted for Trump in 2016 a hallmark of her DCCC bid, suggesting that she knows what the Democrats who won in Trump-leaning Districts will be going through in 2020.

Democrats have some degree of history on their side.

No House majority has changed hands during a presidential year since 1952, and the majority has not flipped in successive elections since 1954.

But these are not ordinary times, and Democrats have some seats that will be immediate Republican targets. At least 12 of those seats will be in districts that voted for the past three Republican presidential nominees, according to The Washington Post’s Philip Bump.

This is unfamiliar territory for Democrats, whose past eight years in the House minority regularly meant that they had few seats to worry about.

After the 2014 elections, Democrats fell to their smallest number of seats since just after World War II. They entered the Nov. 6 elections holding just 13 districts that Trump had won in 2016, losing three of them.

Their main targets initially were the 25 GOP-held seats that Clinton won in 2016, needing a 23-seat gain to claim the majority. They did very well in those districts — Democrats have won 18 of them so far, with a couple more likely to fall into their column once the vote counting ends.

But then Democrats pushed deeper into Trump territory, which gave them the majority and, with races being called day after day, enough of a cushion to think big about what they want to do with the chairmen’s gavels and the House agenda.

They are likely to end up with around 233 seats, which was the exact number Democrats had at the start of 2007 when Pelosi first became leader.