For at least the next 10 years, families in the Children’s Health Insurance Program shouldn’t have to worry about the money running out again.

Senate leaders announced on Wednesday that, as part of a broader budget agreement, they would lengthen the six-year funding extension for CHIP that Congress passed last month to a full 10 years of funding for the program. After a brief government shutdown on Friday morning, Congress passed that deal into law.

It is a remarkable turnaround after CHIP, which covers 9 million children, endured an unprecedented four-month lapse in long-term funding and became a pawn in the bitterly partisan government shutdown fight last month. The Trump administration and Congress took emergency measures to ensure no children were ever kicked off the rolls, but the funding limbo had shaken the faith of families on the program and advocates worried that the bipartisan support that has sustained CHIP might be eroding.

Extending the program had become effectively free after Republicans repealed Obamacare’s individual mandate in their tax bill in December. Because Obamacare plans, which would be the alternative to CHIP coverage, are expected to become more expensive, keeping CHIP instead is actually projected to save the federal government $6 billion over 10 years.

It’s not the permanent CHIP extension that some advocates were hoping for, which would eliminate the possibility of any future crises. But it is still a stunning reversal of the program’s fortunes.

“We strongly support adding four more years of stability and protection to the Children’s Health Insurance Program,” Bruce Lesley, president of First Focus, told me. “That is terrific news but we remain concerned about language that needlessly creates a funding cliff for the program in 2027.”

Congress passed the budget agreement early Friday morning after a Sen. Rand Paul (R-KY) filibuster over the package’s spending increases forced a brief government shutdown. It has several other notable health care provisions: