Heading into the final stretch of their re-election campaigns, the last thing Republicans on Capitol Hill wanted to see in their local papers was the phrase “government shutdown.” So when the chances of meeting Friday’s deadline to fund federal agencies looked remote—as recently as Monday—you knew something was going to get done. And what happened was remarkable: The Republicans’ desire to stay out of the headlines gave Democrats one of their cleanest triumphs in the never-ending budget wars of the Obama era.

The triumph reveals a series of paradoxes at the heart of this struggle, which has defined both parties since Republicans took over the House in 2011. When Republicans make the debate about “spending” in the abstract, they can win, and over the last six years they have ratcheted down the size of government. Austerity looks good to voters in theory. But when the consequences of GOP obstruction and zeal for budget-cutting are made real—by denying relief for flood victims in Louisiana, lead poisoning in Flint, or exposure to the Zika virus—they cave before word gets out to the public.

The continuing resolution to fund the government, which Congress passed on Wednesday night, includes virtually all of the additional priorities Democrats have been seeking for more than a year. It has $1.1 billion to combat the Zika virus—less than President Obama initially asked for, but more than the House of Representatives offered. It has $500 million in emergency funds for flood-ravaged states like Louisiana. It has $7 million to implement a previously passed law to research and prevent the opioid addiction epidemic; that’s far less than the President’s $1.1 billion request, but it kick-starts implementation through December, when more can be authorized.

These additional funding pieces pushed the total price tag over the cap put in place in John Boehner’s 2011 Budget Control Act, a centerpiece of Republicans’ austerity agenda. But those caps were waived—something House conservatives had vowed never to abide. In addition, nearly all right-wing riders, a favored mechanism from Republicans throughout the budget wars, were excised without a fight. Traditionally, the GOP has attempted to get ideological goals Obama might have vetoed in a stand-alone bill into must-pass legislation the president feels compelled to sign. But Democrats objected to provisions tied to Zika funding that would have blocked funding for Planned Parenthood, permitted pesticide spraying near open bodies of water, and allowed the Confederate flag to fly in national cemeteries. All of them are gone. A rider that would have delayed the transfer of Internet domain governance to an international process, something deeply sought by Ted Cruz, didn’t make the bill, either. Nor did additional screening provisions for Syrian refugees.

Democrats also played hardball on long-sought funding to assist the people of Flint with their lead-tainted water crisis. The initial Republican bill had nothing for Flint, in blue-state Michigan, though it included funding to respond to the flooding emergency in red-state Louisiana. But Democrats blocked passage and demanded guarantees to address Flint, banking that Republicans wouldn’t want to bear the blame of shutting down the government over neglecting an African-American community in a swing state.

On Wednesday, the House broke the impasse with an amendment to a water-resources bill already passed by the Senate, authorizing $170 million for Flint. The Senate bill authorized $220 million, but with both chambers passing the bill, they can reconcile their differences and finalize the package after the election. Senate Democrats got guarantees from Majority Leader Mitch McConnell that he would demand the higher level of spending. While many House Democrats were wary of Republicans keeping their promise, the gesture was enough to move the continuing resolution forward.

The bill did extend two things Democrats don’t like: a ban on the Securities and Exchange Commission, moving forward on a regulation requiring public companies to disclose political spending, and a restriction on the Export-Import Bank from making loan guarantees larger than $10 million. Otherwise, though, it was a clean sweep. Even the length of the continuing resolution went Democrats’ way. Conservatives wanted a longer funding bill, but Democrats preferred taking it only into December, to save a potential Clinton Administration from an immediate budget fire to put out after inauguration. Democrats won.

So how does a Democratic caucus with its smallest number of House members since the 1920s, not to mention a minority of the Senate, get almost everything it wants out of a budget bill? First of all, there’s the 800-pound gorilla known as the election. Republicans obviously weren’t confident about winning a rhetorical war with Democrats in October over whom to blame for shutting down the government. Perhaps that’s because they didn’t want their year of fighting to prevent funding for Zika, Flint, and opioid abuse to define them.

But there’s a larger issue here: This entire Congress has been an exercise in Republican stinginess with using public resources to react to crises. In theory, Republicans relate government budgets to family budgets, claim that America is going broke, and position themselves as good stewards of the public coffers. In practice, they don’t want to pay to stop birth defects, to keep children from drinking contaminated water, or to prevent unnecessary drug-related deaths.

When the theory runs up against the practice, the result makes Republicans look unnecessarily cruel. And their actions on the continuing resolution make clear that they fully recognize that. They didn’t want to get into a fight with Democrats, weeks before the election, on whether it makes sense to withhold assistance from the child in Flint, or the opioid-addicted teen in Appalachia, or the Zika-infected pregnant mother in Florida.

The invisibility of Congress in this Trump-dominated campaign season made the Democrats’ strategy more likely to succeed. Republicans didn’t want to attract any of the negative attention a government shutdown would provide—any attention at all, really. So they had to give Democrats what they wanted.

Because there’s not a big election every three months, this strategy won’t necessarily have legs moving forward. But it’s striking, and significant, to see the degree to which Republicans recognize their political problem—the fact that their deficiencies lie in actually putting into practice their values of limited government. That seems perpetually exploitable for Democrats, including a potential Clinton administration. President Hillary Clinton would likely face an adversarial Republican Congress, one that will try to continue rhetorically playing to its hardcore base while not trying seriously to put any of it into practice. Heightening that contradiction could yield political rewards.

So Republican obstructionism has its limits, and Democrats may have figured out a way to take advantage of that. But as the Obama administration comes to a close, that shouldn’t blind us to the fact that the budget wars have always been waged on Republican turf—and still are. Boehner’s Budget Control Act, which imposes an artificial spending cap on appropriations, has mostly held for the five years since it passed. This has led to some of the lowest levels of public investment since World War II, and a self-defeating austerity that stunted economic growth. As of this July, public sector payroll jobs remain lower than when Obama took office, a stark contrast to every president of the past 40 years, Republican or Democrat.

The Bipartisan Budget Act of 2015 raised the cap—but only by $30 billion a year in a $1 trillion discretionary spending budget. That’s barely a blip, and overall spending remains constrained by these prior dictates. A Clinton administration may be able to overturn such a cap, if they make it a priority, by playing on the tangible consequences of budget cuts—what they mean for children, for veterans, for seniors, for the poor. But as long as Republicans keep it vague, history shows they can put the whole government in a straitjacket with relative ease.

Republicans set out to shrink government, and they succeeded. Democrats may have figured out how to play the game and get some of their priorities funded. But in football terms, they’ve only gained a first down and are still a long way from the end zone.