For reasons lost to history, Congress expressly forbids the territory of Puerto Rico from using the municipal bankruptcy provisions of federal law known as Chapter 9. Now that Puerto Rico's public agencies face a debt crisis, U.S. lawmakers are considering a bill that would change the rules in the middle of the game.

Excluding Puerto Rico from Chapter 9 serves no discernible public policy purpose. It is perfectly appropriate for Congress to treat Puerto Rico like a state for purposes of municipal bankruptcy law. However, subjecting Puerto Rico's existing creditors — including banks and bondholders — to the law would be unfair.

Chapter 9 permits cities, counties and certain state-created corporations to file for federal bankruptcy protection, so long as the state agrees. In recent years, the cities of Detroit and Stockton, Calif., have both used Chapter 9 to restructure debts owed to bondholders and city retirees.

A current House bill scheduled for a hearing later this week would extend the same privilege to Puerto Rico. The Puerto Rico Chapter 9 Uniformity Act of 2014 has recently taken on a particular sense of urgency for the territory's government.

Earlier this month, a federal court invalidated Puerto Rico's Public Corporations Debt Enforcement and Recovery Act, which was meant to fill the gap in insolvency regulation created by Puerto Rico's exclusion from Chapter 9. The Recovery Act had been passed in mid-2014 to aid Puerto Rico's power authority, which is in danger of defaulting on over $9 billion in debt. While the case is under appeal, many believe the Recovery Act is preempted by the federal law and will not survive further court review.

The problem with the House bill is that Puerto Rico's existing creditors presumably offered credit based on the default risks at the time. For example, the power authority's bondholders surely relied on the availability of local and contractual remedies in the event of a default.

Extending Chapter 9 to Puerto Rico would change these rules retroactively — and it is likely that some creditors would fare better under local Puerto Rico law than under a Chapter 9 proceeding.

Creditors are entitled to the benefit of the bargain they made with Puerto Rican public agencies. Altering the rules at this point could amount to picking winners and losers based on political expediency.

Therefore Congress should amend federal law to allow Puerto Rican entities to avail themselves of federal bankruptcy protection. But the amendment should only apply to future transactions in which creditors will be able to consider their likely treatment under Chapter 9 before lending money.

John McMickle is the founder of JDM Public Strategies, a consulting firm that works in financial services and government relations. He served as the bankruptcy counsel to the U.S. Senate Judiciary Committee from 1994 to 2001. Follow him on Twitter @jdmpsllc.