House Speaker Paul D. Ryan (R-Wis.). (Kevin Lamarque/Reuters)

IN A badly broken Washington, even small victories for normal governmental process count as cause for celebration.

Consider Thursday’s agreement between House Speaker Paul D. Ryan (R-Wis.) and the Obama administration on a measure to help Puerto Rico out of its debt crisis. The need for legislation is obvious and urgent, given Puerto Rico’s insolvency, its $2 billion debt payment due in July and the lack of any bankruptcy-like mechanism for resolving the situation under existing law. That’s why Mr. Ryan had set a March 31 deadline for action by the House — only to be thwarted by an effective, but not very transparent, lobbying effort led by hedge funds with an interest in blocking restructuring of Puerto Rican bonds they bought at fire-sale prices.

Taking to the airwaves with hyperbolic warnings of an impending taxpayer “bailout,” these interests helped distort and delay House work on a bill, pushing Puerto Rico and its beleaguered populace right to the edge of financial collapse — and a possible humanitarian crisis. The fact is that neither Mr. Ryan nor the Treasury Department ever contemplated using federal taxpayer funds to pay off debts incurred by the island’s government, which has been justly accused of taking a bad economy and making it worse through mismanagement and, in some cases, corruption. Instead, what’s been on offer is a “workout.” Creditors may be bought out at a discount, giving Puerto Rico financial breathing room, in return for which the island will have to make structural reforms so it can meet reduced obligations and restart growth. Legislation to make this possible has been crafted pursuant to Congress’s constitutional authority to make laws for the territories, thus debunking another of the opponents’ claims: that a bill would set a debt-escape precedent for fiscally irresponsible states.

The text that emerged Thursday reflects relatively minor changes from previous versions, a sign Mr. Ryan was able to win over members of his own party who had been wavering under pressure from the lobbyists. It would put a temporary halt to lawsuits by creditors and put an oversight board, appointed on a bipartisan basis by Congress and the president, in charge of Puerto Rico’s finances. The board would be empowered to negotiate debt relief while all but imposing a balanced budget on the island’s government. Creditors still howl that the board could pay public employee pensions before bondholders; the bill actually preserves existing lawful priorities and leaves it up to the board to grant any adjustments, subject to court review. To be sure, this basically relocates the same squabble among creditors that had been playing out in Washington; now the referee will be an impartial panel of experts armed with a reliable audit of the island’s obligations.

Puerto Rico’s governor protested an “attack [on] our self-government,” which is actually a reassuring sign the measure has teeth, much like the rescue plan for the District, upon which it is modeled. The District’s current prosperity is due in no small part to that plan’s success in resolving its fiscal crisis two decades ago. With any luck, Puerto Rico will find a road to a similar recovery, starting with passage of this bill.