GOOD NEWS! Puerto Rico has officially gone bankrupt. Now, we don’t mean that literally. There is no cause for celebration in the financial disaster that has befallen the Caribbean home of 3.7 million U.S. citizens. Nor, in a legal sense, is the debt-workout process that’s about to unfold the precise equivalent of what a corporation would go through under Chapter 11 of the bankruptcy code, or a municipality under Chapter 9.

Rather, Puerto Rico’s government has ended fruitless debt talks with its bondholders and invoked a bankruptcy equivalent that Congress enacted in a 2016 law crafted for the specific purpose of stemming a financial death spiral on the island. This sets the stage for an impartial federal judge to referee the bewildering mass of conflicting claims by holders of more than $70 billion in debt. That is a positive development: The new rules are working as Congress intended and Puerto Rico may finally get a chance for a fresh start as a result.

Basically, the law subjected Puerto Rico to the same deal the District of Columbia had to accept when its finances got out of control a couple of decades ago: debt relief in return for real fiscal and economic reform, tightly supervised by an outside board of experts. In March, that board signed off on Gov. Ricardo Rossello’s plan for a 10-year path to solvency, having sent back his original package of spending cuts, revenue enhancements and structural reforms for a toughening-up.

The island’s bondholders are griping and litigating, on the theory that Puerto Rico’s plan could have allocated more money to debt service. They have a point, in that they bought the debt relying on guarantees that it would be paid ahead of all other obligations; there is also a risk of setting a bad precedent any time a public entity is enabled to default. Our sympathy for such arguments is limited, however, by the fact that many of the island’s creditors at this point are hedge funds that purchased Puerto Rican debt at a discount, after the debt crisis began, angling for a windfall. Congress, in its sovereign authority, has decided that the success of that business model should not trump all other considerations — wisely, in our view.

Come to think of it, if other states and cities, and those who lend to them, took this turn of events as a reminder of the risks attendant on fiscal indiscipline, that wouldn’t be such a bad outcome, even if interest rates on municipal debt had to rise by a basis point or two. What matters now for Puerto Rico is reasonably shared sacrifice by all — creditors, public-employee pensioners, bloated government agencies — so as to restore financial order and rekindle economic growth. As it is, the fiscal plan envisions a short, sharp recession due to the initial dose of austerity, with structural reforms kicking in only later. In other words, even a best-case scenario has Puerto Rico enduring a difficult adjustment before it starts to see the benefits. The District’s experience, however, suggests that, with time and effort, there can be a happy ending.