House Majority Leader Steny H. Hoyer, during his two decades as a senior Democratic vote-counter, has often preached to his fractious caucus about what he calls the “psychology of consensus.”

“I tell people: You may not always be on the team. There may be a time when you think, ‘I don’t agree with this. It’s not good for my district. I don’t think it’s good for the country,’ ” Hoyer (D-Md.) said in a recent interview. “We get that, but I want you to think consensus. I want you to think party unity.”

Come January, Hoyer and senior Democratic leaders might need a lot more than the power of positive thinking. Facing the tightest House majority in at least two decades, they are already sketching out ways to manage a legislature that will spend two years on a razor’s edge.

Following unexpected Election Day setbacks, Democrats could hold as few as 222 seats when the new Congress convenes. That number, just a handful of seats over the majority threshold of 218, will drop further when Rep. Cedric L. Richmond (D-La.) resigns to join the Biden administration as a senior adviser to the president.

Elected Democrats have given various explanations for why President-elect Joe Biden often outperformed other Democratic candidates during the 2020 election. (The Washington Post)

The governing implications for President-elect Joe Biden, House Speaker Nancy Pelosi (D-Calif.) and Democratic congressional leaders are stark: Pushing any sort of partisan measure through the House will require near-unanimity inside their party, forcing careful negotiations with various factions of lawmakers and perhaps fewer aspirational “messaging” bills meant to set out Democratic ideals but not necessarily become law.

Meanwhile, an emboldened Republican minority will look to wreak havoc and magnify internal disputes ahead of the 2022 midterms. Unchastened by Biden’s victory given the GOP House gains, House Minority Leader Kevin McCarthy (Calif.) and other Republican leaders have already signaled they plan to use various procedural feints to frustrate Democrats and sow internal division.

“In this next Congress, we might not be able to schedule the floor, but we are going to run the floor,” McCarthy told reporters last week.

“Baloney,” responded Hoyer. But he acknowledged that Democrats will have to show an unprecedented amount of cooperation to deliver high-stakes legislation addressing the coronavirus crisis, federal spending and an upcoming debt-ceiling extension, not to mention the rest of Biden’s agenda — a tall order inside a caucus frequently riven by internal conflicts.

Hoyer said he has already taken steps to make the Democrats’ shrunken majority more manageable. He has instructed committee chairmen to ensure that the bills they advance are bipartisan or can win the support of a broad spectrum of Democrats. He is signaling openness to changing the House rules to curtail a minority procedural tool that Republicans have frequently used to divide the majority. He is hoping to reinstitute an altered system of appropriations earmarks, reviving a practice that, while sometimes abused, helped build bipartisan support for must-pass spending bills.

And, Hoyer said, he is working to make sure the Democrats’ majority shrinks no further — telling Biden’s team that now is not the time to recruit for their administration on Capitol Hill.

“My view is that we need to keep every member we have,” he said. “We’ll see what happens. But I would prefer that we didn’t take members out of the Congress.”

The concern about potential razor-thin margins in part reflects the transformation on Capitol Hill since the early 2000s, the last time the majority was nearly so small. For most of President George W. Bush’s first two years in office, Republicans had no more than 222 votes in the House but managed to push through major bipartisan bills such as the No Child Left Behind education measure, the Sarbanes-Oxley financial accountability law and a renewal of fast-track trade-negotiating authority. Moreover, the 9/11 terrorist attacks led to further bipartisan accord on national security matters.

Now, the political landscape is vastly more polarized. Where Bush-era Republicans could win votes from dozens of conservative and moderate Democrats, both parties are now ideologically more homogenous — to say nothing of the influence that Donald Trump is likely to have on the GOP ranks for years to come, probably chilling any significant attempt at bipartisanship.

Rep. Jim Banks (R-Ind.), the incoming chairman of the conservative Republican Study Committee, said last week that he expects a “constant food fight” between Democratic leaders and the hard-left “Squad” that will create gridlock and help propel the GOP to the majority in 2022.

“Democrats will be so mired in the infighting between the two wings of their party that the American people get sick of it very quickly,” he told a reporter.

Top Republican leaders are relishing their opportunity to spark as much of that infighting as they can between Democrats’ far-left wing and the cadre of moderates who have won the most competitive districts.

McCarthy, for instance, is already pressuring moderate Democrats to sign a discharge petition that would pave the way for passage of a bill extending the Paycheck Protection Program for small businesses — thus undermining the Democratic leadership’s bargaining position on a new coronavirus relief package.

GOP leaders are also eager to keep using the “motion to recommit” — a final amendment offered by the minority party just before the passage of a bill — to drive wedges in the Democratic caucus. Republicans have succeeded in using the maneuver to amend bills eight times in the past two years, often on hot-button issues that divided Democrats, such as immigration and U.S. support for Israel.

That success — and the steady transformation of the motion to recommit into a political cudgel — has prompted many Democrats to call for its modification or abolition. Hoyer is now among them. “I think it’s a waste of time, personally, and we’re looking at what alternatives exist,” he said.

But eliminating the motion or raising the threshold for its passage stands to fuel more GOP attacks and encourage more mischief from the minority — not only on the floor but also in committees that will be much more closely divided next year.

“Every day you’re in session is fraught with peril,” said Rep. Patrick T. McHenry (R-N.C.), a former senior GOP whip, describing the volatile circumstances House Democrats face. “On top of that, you have us, the sharks on the opposite side, that will be looking for every opportunity to put the screws to them against their agenda, their bad policy, against bad rules changes, and hold their members accountable, especially going into a midterm that is decidedly not in their favor.”

The party occupying the White House typically loses seats in a president’s first midterm election.

The threat to Democratic unity is as much from within as it is from outside, however, with slim margins potentially empowering rival blocs inside the Democratic ranks to band together and hold legislation hostage. Many lawmakers fear a reprise of the incessant infighting that Republicans experienced in the first two years of Trump’s term, when a muscular right flank frequently complicated the passage of health-care and fiscal legislation.

Those fears have only been stoked by the finger-pointing between the left and center factions that immediately followed Election Day as each side sought to make sense of the party’s underperformance down the ballot. Swing-district moderates blamed unpopular left-wing policies and slogans such as “defund the police” for their losses, while liberals argued they have been scapegoated for moderates’ weak messaging and lackluster campaigns.

The tensions have subsided somewhat as Democrats come to grips with their tenuous majority. With five House contests still unresolved, Democrats have secured 222 seats, and Republican candidates hold leads in all five of the uncalled races.

Rep. Alexandria Ocasio-Cortez (D-N.Y.), a leader of the “Squad” that will significantly expand its ranks even as the larger Democratic majority shrinks, acknowledged that liberal activists tend to bristle at the suggestion that the burden should be on the left to rein in its ambitions. But, she said, “I think there is a little bit of a kind of a realization inside the caucus that we have to work together.”

With a larger majority, she said, “we could afford to lose, you know, 10, 15 members. Now, I’m hoping — I sense — that there is more of an openness to collaboration. But we’re going to have to see.”

The close margins are also a potential boon to a group of centrists, the Problem Solvers Caucus, that was largely sidelined for the past two years. The group stands to have much more relevance in a closely divided House — and especially if the Senate remains under Republican control after a pair of Jan. 5 runoff elections in Georgia, forcing Biden to run his legislative agenda through a GOP gantlet.

“We need to do some problem-solving within the caucus, not just between the Democrats and Republicans,” said Rep. Josh Gottheimer (D-N.J.), a co-chairman of the group. “We’re going to have to talk to each other and recognize that no one’s going to get everything they want. But if we want to govern and actually help the president-elect achieve his agenda, just by the nature of the numbers, we’re going to have to pass things that are more pragmatic.”

Multiple Democrats up and down the party ranks and across the ideological spectrum said they are counting on Biden to be a unifying force who can help hold their fractious caucus together under trying circumstances.

That includes Hoyer, who said having a president who can actually sign bills into law is a “tremendous advantage” over trying to whip votes for bills going nowhere. In a sign of the close ties Biden expects to maintain on Capitol Hill, the president-elect named Hoyer’s top floor aide, Shuwanza Goff, as one of his first White House appointments. But Hoyer said the Democrats’ thin margin itself stands to generate esprit de corps.

“The psychology of consensus understands: They can’t lose me and three other people,” he said. “I think there’s an awareness that we’re in the foxhole together, and there’s not a lot of us, and we’re being assaulted, and so you’ve got to be together. And I think that will work to our benefit.”

Paul Kane contributed to this report.