Democrats may feel today as though they just fought -- and won -- the equivalent of a 100-year war. The House passage Sunday night of sweeping healthcare legislation ends months of caustic debate over the plan and the way it was enacted, marked by a steep decline in approval for Democrats almost everywhere.

Now, they hope, the discussion will finally shift in their favor.

President Obama was spared a devastating defeat, and squabbling lawmakers showed they could accomplish something epic and important in the face of unanimous GOP opposition. That should count for something, they hope, at a time when many voters had written off Washington as utterly dysfunctional.

“The American people got too close a look at how Congress actually legislates and that’s an ugly thing,” said Jim Jordan, a Democratic campaign strategist. “Once the legislative process is done, the debate turns to what’s in the bill,” adding that what’s in the bill is, “by and large, extremely popular with the public.”

But in fact, the political battle is just beginning.

The party now must live or die with its landmark legislation in hundreds of congressional districts across the country, in the most hostile midterm election climate Democrats have faced since the Republican landslide year of 1994.

“Given that Democrats have basically lost the healthcare messaging fight for the last year, I’m not sure why we should think they will begin to win over the next seven months,” said Charlie Cook, one of Washington’s leading election handicappers.

Strikingly, both sides walked away Sunday night believing they had won politically.

Republicans were not rejoicing. They lost the vote, after all. But party strategists were convinced Sunday’s vote would enhance their chances of winning control of the House and maybe the Senate in November’s elections.

To their mind, passing a sweeping healthcare overhaul in the face of negative public opinion -- and turning legislative somersaults to accomplish the feat -- only served to underscore the arrogance and obtuseness of the Democratic majority.

“Their choice was to pass bad legislation or prove they’re incapable of governing,” said David Winston, a Republican pollster who works closely with the party’s House and Senate leadership. Moreover, he said, the effort was off point; by far the greatest concern of most voters is the nation’s stubbornly high unemployment rate.

“When are they going to get time to sell this thing?” Winston asked. “They need to be talking about jobs.”

This year figured to be tough for Democrats, whatever happened Sunday. The party holding the presidency almost always loses House seats in the first midterm vote. Since World War II the average is 16. (It’s been pretty much a wash in Senate races.)

Democrats would be thrilled if that were the outcome Nov. 2, but it seems highly unlikely in this seething anti-incumbent environment. Handicappers give Republicans a good shot at picking up several dozen House seats in November and a decent chance of winning the 40 needed to seize control of the chamber. The GOP needs 10 seats to take the Senate and, though that seems a much taller order, it is not out of the question.

For Democrats, the next several months will be spent trying to hold down their losses, which makes passage of the gargantuan healthcare bill all the more audacious -- especially when the chief animating force in politics today is a profound mistrust of Washington and anger over the expansive growth of government, embodied by the rise of the “tea party” movement.

Democrats are betting they can gain from a number of the provisions in the bill, including popular measures that would allow adult children to stay on their parents’ policies until they turn 27, close the gap that forces some on Medicare to pay more for drugs and ban insurance companies from denying or dropping coverage for people because of preexisting conditions. They also believe they will benefit from all the things that won’t happen after Obama signs the legislation: The sky won’t fall, grandma won’t be put to death, federal troops won’t be occupying hospitals, as Jordan sarcastically put it.

But it’s hard to benefit politically just because things don’t turn out as bad voters feared.

Consider last year’s economic stimulus package, which experts say prevented a steep economic downturn from being a whole lot worse. Obama and Democrats have received little credit for their rescue effort; to the contrary, the stimulus and serial bailouts that began under President George W. Bush have only fueled populist anger.

Politicians like to say that good policy makes good politics, and some believe it.

The merits of the bill passed Sunday will be debated for years to come. ObamaCare, as opponents derisively call it, may eventually prove as popular as Social Security and Medicare, two programs that provoked fierce debate but, over time, grew politically sacrosanct.

Even so, Democrats must have in the back of their minds the memory of President Lyndon Johnson who, upon signing the 1964 Civil Rights Act, said his party had lost the South for a generation. It’s been longer than that, though few today would question the rightness of outlawing racial segregation in theaters, restaurants, hotels and other public places.

That may prove cold comfort, however, for Democrats who cast an aye vote Sunday and, as a result, may have to await history’s verdict in forced retirement.

mark.barabak@

latimes.com