Maintaining unity is often a struggle for a majority party grappling with the realities of governing. But never before has unity been so deliberately undermined by a party’s own president.

President Trump has been publicly pinning his legislative failures on Senate Majority Leader Mitch McConnell. Trump is backing a right-wing primary challenge against Arizona Sen. Jeff Flake, and when he visited Arizona recently, sniped at Flake and the state’s other senator, John McCain, who is battling brain cancer. The president also took a random pot shot at another GOP incumbent up for re-election, Tennessee Sen. Bob Corker. Donald Trump is emulating Harry Truman’s crusade against the “do-nothing Congress” of 1948, except that in Truman’s case, he was attacking a Congress controlled by the opposition party.

Trump’s broadsides against his fellow Republicans are not solely the thoughtless rantings of a petulant amateur. They are strategic and purposeful. Paul Kane of The Washington Post notes that some of Trump’s “advisers believe that dysfunction on Capitol Hill is likely to continue and that the further away Trump is positioned from the gridlock, the better his political standing will be heading toward his own re-election campaign in 2020.”

It’s advice Trump has taken. “Trump frequently tells aides that he wants distance from Congress,” reports Josh Dawsey of Politico, “He doesn’t want to be associated with any failure and is increasingly convinced the American public sees Congress as failing.”

Such a strategy would be insane for any other president to pursue. It practically guarantees the demise of his legislative agenda, and it gift-wraps a midterm campaign message for the opposition. But there’s little proof Trump is primarily driven to win legislative battles. He expends far more energy on creating media dramas that outrage his detractors and tickle his fans, than on the dealmaking he claimed to have turned into an art form.

Still, the strategy hasn’t paid off yet politically. The president’s own political standing is terrible. He has only a 35 percent job approval in the Gallup tracking poll at the end of last week and 38.6 in the RealClearPolitics average. He hasn’t reached 40 percent for the last seven weeks. He has never reached 50 percent in his entire presidency, a benchmark he seems extremely unlikely to ever reach.

With an unpopular president choosing to sow division among a more unpopular Republican Congress, a midterm election that buoys the Democrats would appear to be a certainty. Yet that presumes the Democrats don’t succumb to their own divisions. One would think that the daily panic Trump induces in Democrats would focus the mind. Perhaps, come Election Day, it will. Yet rumbles of division persist.

Not so much on Capitol Hill, where everyone from center-right- Sen. Joe Manchin of West Virginia to “Democratic Socialist” Sen. Bernie Sanders have locked arms to thwart Trump on health care changes. Congressional Democrats are poised for a repeat performance next month to prevent inclusion of border wall funding in any bill to keep the government open.

But harmony is not as easily found within the progressive activist community. Two new allied groups, Justice Democrats and Brand New Congress, are raising money for left-wing candidates who challenge incumbent congressional Democrats. And more eyes are on what Our Revolution might do.

The populist outfit founded by Sanders has not yet endorsed any challengers to current House and Senate Democrats. But Our Revolution President Nina Turner (pictured) is not shy about attacking the Democratic establishment, raising the prospect that she soon will.

After the Democratic National Committee wouldn’t let Turner bring several dozen people inside headquarters to deliver petitions supporting a more expansive platform than the “Better Deal” package of economic reforms touted by Senate Minority Leader Chuck Schumer, Turner ripped party leaders as “dictators” before sending an email to her group’s membership. “It is time to make the Democratic Party ‘Feel the Bern’ again.” She has also said that any Democrat who doesn’t share Sanders’ belief in a single-payer health care system has “something wrong with them” and that she won’t accept “hemming and hawing” on the subject.

Whether that means Turner will weaponize Our Revolution against Democratic incumbents is unknown. We have seen one example of hesitancy on the part of Sanders to let his project descend into a vehicle for political fratricide. In the primary to determine which Democratic will face off against vulnerable Nevada Republican Sen. Dean Heller, the state chapter of Our Revolution is refusing to get behind the party’s preferred choice, Rep. Jacky Rosen. But former Sen. Harry Reid successfully leaned on Sanders to prevent the national organization from following suit.

It is also unclear whether Justice Democrats and Brand New Congress have the muscle to recruit an army of challengers. So far they have only produced five House candidates and one Senate candidate targeting Democratic incumbents.

Even if Democrats avoid a full-blown bloodletting during the primary season that saps precious resources, the ideological divisions within the party are not going away anytime soon. Rank-and-file Democrats have not been able to put aside all differences and focus on the common political enemy of Trump, because pragmatists and populists still blame each other for the debacle of 2016.

The Senate map in 2018 is difficult for Team Blue, with 10 Democratic seats up for re-election in states carried by Trump, and only one Republican seat in a state Clinton won. Most political handicappers give Democrats a better shot at taking the House, although FiveThirtyEight’s Dave Wasserman warns that GOP-led gerrymandering and the concentration of Democratic voters in urban congressional districts complicates Democrats’ electoral chances in the House as well. He illustrates the problem by comparing the median House seat – the 218th seat when one ranks the 435 districts from most Republican to most Democratic – to the presidential election returns. “In 2016, Trump lost the national popular vote by 2.1 percentage points, but Republicans won the median House seat by 3.4 points,” Wasserman notes, “tied with 2012 for the widest House disparity in the last half-century.”

To win on such skewed terrain, Democrats will need a combination of strong liberal base turnout, weak conservative turnout, and aid from moderates and independents. This year’s special House elections suggest that trifecta is possible – even though Republicans won them all, they were all closer than they should have been because Republican turnout was limp across the board. But if a big enough faction of Democrats decides to stay home as well, then an opportunity will have been missed.

Both parties are unsettled and in flux. Neither will fight in the midterm elections fully unified. The question is which party can best contain its divisions in the short run. Can congressional Republicans can find a way to turn the tables on Trump’s offensive? Can Democrats set aside their differences for now, and save their looming civil war for the 2020 presidential primary stage? May the least divided party win.