House Minority Leader Nancy Pelosi talks to Post reporters in her office on Capitol Hill on May 2, 2017. (Oliver Contreras/For The Washington Post)

When House Republicans posted enough votes to pass their plan to revamp the nation’s health-care system Thursday, Democrats broke out into song. So convinced it was a political loser, Democratic lawmakers sang “Nah Nah Hey Hey Kiss Him Goodbye” the way victorious sports fans jeer their opponents.

Their head of candidate recruitment guaranteed that Republicans would “pay a price” in 2018, saying he planned to use the controversial legislation as an incentive for prospective Democratic candidates to jump into races. “I have a significant number of hours blocked out to make phone calls,” Rep. Denny Heck (D-Wash.) said.

But Democrats might be guilty of some premature exuberance. There are two major obstacles standing in their way to putting together a strong campaign to win back the House majority: their own internal divisions and time.

Democrats are — slowly but surely — engaging in the sort of infighting that usually happens right after losing a presidential election. That reckoning was delayed because President Trump’s stunning victory last November created a fierce energy among Democrats to fight the new administration at every turn, forging a common bond from the party’s coastal liberals to its Midwestern moderates.

That early anti-Trump unity, however, papered over deep divisions about what went wrong during the campaign and what the party should do ahead of the 2018 midterm elections.

That’s all changing now.

(U.S. House of Representatives)

Pelosi: Democratic candidates should not be forced to toe party line on abortion

A perfect example came last week when House Minority Leader Nancy Pelosi (D-Calif.), in an interview with The Washington Post, dismissed complaints from abortion rights activists who do not want party resources to help any antiabortion Democrat.

“This is the Democratic Party, this is not a rubber stamp party. This is a party of great diversity,” Pelosi told the Post Tuesday, noting that many Catholic family members who she grew up with in Baltimore’s Little Italy neighborhood remain opposed to abortion. “You think I’m kicking them out of the Democratic Party?”

Within hours, Pelosi’s comments sparked a fury.

Some praised Pelosi’s candor, recognizing that the the Affordable Care Act and other key items of the Obama administration would not have passed in 2009 and 2010 without the support of antiabortion House Democrats.

“Straight forward and sensible,” David Axelrod, the former top strategist to Barack Obama, tweeted.

Others lashed out at Pelosi.

(Daron Taylor/The Washington Post)

“Encouraging and supporting anti-choice candidates leads to bad policy outcomes that violate women’s rights and endanger our economic security,” Ilyse Hogue, president of NARAL Pro-Choice America, told The Post.

“We are dismayed by Minority Leader Pelosi’s out-of-touch and self-serving statements that throw women and their right to make their own moral decisions under the bus,” Jon O’Brien, president of Catholics for Choice, said in a statement.

The fact that Pelosi — a heroine to most liberals, the first female House speaker and a leader on women’s rights for decades — came under fire speaks volumes about how much Democratic grievances are left to be fully aired before the midterms.

In March, Sen. Elizabeth Warren (D-Mass.), another liberal icon, backed off her original support of Ben Carson as secretary of Housing and Urban Development. She had supported Carson in a committee vote and then faced an outcry from anti-Trump activists, leading to a Daily Kos story headlined “The Resistance Crumbles.” She then voted against Carson in the full Senate vote five weeks later.

Other disputes are coming to the forefront because elections are underway again, reopening old wounds from the hard fought 2016 presidential primary between Sen. Bernie Sanders (I-Vt.) and former secretary of state Hillary Clinton.

The Democratic Congressional Campaign Committee has devoted nearly unlimited resources to the special election for a House seat in the suburbs north of Atlanta. It’s considered a beta test for the 2018 plan to target dozens of Republican districts in highly educated, diverse suburbs outside Philadelphia, New York, Los Angeles and other cities.

But Sanders did not endorse the leading Democratic candidate, Jon Ossoff, until after he fell just shy of the 50-percent threshold in initial balloting, forcing him into a June runoff election.

Almost no resources went to a special election in southern Kansas and a modest sum has gone to the race for Montana’s at-large seat in the House, prompting Sanders to deliver a rebuke to the DCCC for not doing as much to help in those races.

For their gubernatorial nomination, Virginia Democrats will decide between former representative Tom Perriello, supported by Sanders, or Ralph Northam, the lieutenant governor who has the backing of Gov. Terry McAuliffe, a longtime confidant of the Clintons.

Democrats turn to Sanders and his star power to rebuild the party

Democratic leaders like to say that they aren’t divided on policy grounds the way Republicans are. GOP leaders in Congress tend to support free trade and have more open views to immigration, while their conservative base has embraced much of Trump’s America-first nativist vision.

Those divisions were on display as House Republicans struggled for two months to find the votes to pass their repeal of the ACA, creating more optimism among Democrats that they can win big in next year’s elections.

But there is so much time until then. In the previous three election cycles, Democrats essentially won the messaging wars in the odd year, only to flounder in the even year when ballots were actually cast.

Take 2011, when the new Republican majority approved the fiscal blueprint of Rep. Paul D. Ryan (R-Wis.), the future House speaker who then chaired the House Budget Committee. It included a proposal to turn Medicare into a voucher program, and that spring, Democrats won a special election in Upstate New York largely by campaigning against Ryan’s budget.

But Ryan’s Medicare proposal went nowhere and faded from the public consciousness, even after he was chosen as the Republican vice-presidential nominee in 2012.

There’s a real chance that Ryan’s health-care legislation could fade away as senior Senate Republicans vow to write their own version of the bill.

That’s why Democrats are focusing on creating a unified front in the coming months around an economic agenda, because they are going to need votes from across the ideological spectrum to win the 24 seats needed to win back the House majority. They’re going to need votes from people like Pelosi’s family who support the party’s position on boosting middle-class income but oppose its stance on abortion rights.

“They’re there to fight for people’s rights, working families,” Pelosi said of her loyal Democratic family members. “What are we talking about here? In our caucus, one thing unifies us: our values, about working families.”

Read more from Paul Kane’s archive, follow him on Twitter or subscribe to his updates on Facebook.