SEWICKLEY, Pa. — Just a few years ago, then-Speaker of the House John Boehner and Senate Minority Leader Mitch McConnell were treated by their own Republican Party’s grass roots as the enemy.

Case in point: Thousands of angry demonstrators gathered outside the luxury Brooklyn apartment building of Democratic Senate Minority Leader Chuck Schumer Tuesday evening. They held up signs and chanted “What the f- -k, Chuck?!” The progressive wing of his party was putting him on notice.

Their beef? To make sure he never plays ball with President Trump — or any Republican.

The Democrats’ civil war is in response to the party losing the House, Senate and presidency, while it holds a historically low number of seats in state legislative bodies and governors’ offices. If there’s any consolation for them, it’s that Republicans washed out of power in 2008 but took back the House in 2010 and the Senate four years after that.

But liberals still believe they’re the side with the most power and influence because of their cultural dominance. The arts and entertainment world confirms their prejudices daily. The real world, however, does not.

And so their expectations of what their congressional leadership is capable of don’t mesh with the reality that Schumer faces day in and day out. At the same time, the leftist base understandably doesn’t trust the party’s old guard — Schumer and House Minority Leader Nancy Pelosi prominently among them. After all, their leadership led them to this point.

It appears Democrats have concluded that their problem isn’t message but motivation, says Paul Sracic, political science professor at Youngstown State University: “This is always a central question for parties: Do you try to reach beyond your base, or simply try to inspire your core members to turn out on Election Day?”

The base’s tack — arguing that Trump is akin to Hitler, when he takes actions that many of his voters find at least arguably appropriate, even if they have questions — cuts off debate. It’s a mistake Hillary Clinton made in trying to scare voters away from Trump rather than articulating why she was the right choice.

And now the angry left, thinking it’s learning from Clinton’s mistakes, is actually repeating one of her biggest. Essentially, the Clinton faction won the party’s nomination, but the Bernie Sanders faction won the day. Instead of offering independents, moderate Democrats or reluctant Republicans an alternative, those non-liberals see protest after protest, outrage after outrage — and they’re tuning the anger out and going on with the business of life.

It appears that the Trump team grasps that with a strategy zeroed in on making the Democrats constantly play defense.

Says Sracic, “Trump issues an executive order beginning the process of dismantling the ACA [Affordable Care Act], and Democrats respond by saying he is trying to ‘Make America Sick Again.’ People think, however, that the ACA needs to be improved. Where is the Democratic alternative?

“You can argue the same thing about immigration, taxes and regulations, all subjects of Trump executive orders.”

While they’re fighting these internecine battles, Trump is quietly taking more of the ground the Democrats are giving up without a fight. His reinstatement of the Mexico City policy, barring funds from international agencies that perform or promote abortion, has solidified his support among religious conservatives. Withdrawing from Trans-Pacific Partnership trade deal, meeting with union leaders and threatening tough actions against Chinese trade violations have locked in his support from working-class voters.

This puts Democrats from more working-class areas in a bind. They’re being pushed to the left by the party base, but that makes them more vulnerable to a challenge from a Trump-supported Republican.

“Imagine if Trump came to Youngstown [Ohio] and campaigned for a Republican candidate for Congress,” said Sracic. “He might be able to actually put what has always been a solid blue district in play.”

Right now the youthful, multiethnic, educated Democratic base coalition is too agitated to understand it needs to grow its party’s support and not marginalize itself with some sort of ideological purity test.

But if the bloody civil war continues, the left will lose yet another seat, like the one in Youngstown that Sracic is talking about, and perhaps more, in 2018.