The Puerto Rican flag flies in front of Puerto Rico’s Capitol in San Juan. (Ricardo Arduengo/AP)

Supreme Court justices on Tuesday wrestled with whether Puerto Rico can use bankruptcy to avert a likely default on billions of dollars in debt, as the territory appealed for a way out of what it called a legal “no man’s land.”

The justices seemed to be struggling with the confusing language of a 1984 federal bankruptcy law that stripped Puerto Rico (and the District of Columbia) of their status as equivalent to “states” — making it impossible for the commonwealth to either use Chapter 9 of the federal bankruptcy code or adopt bankruptcy legislation of its own.

After Congress rebuffed Puerto Rico’s appeal for bankruptcy protection last year, the island’s government passed legislation that would make it easier to restructure its roughly $72 billion in debt, which includes $20 billion owed by its electricity, water and road-maintenance divisions.

But bondholders represented by Franklin Templeton, Oppenheimer & Co., and others have argued that the federal statute explicitly bars Puerto Rico from using Chapter 9 and “preempts” the Puerto Rico government’s own legislation. Their attorney, Matthew D. McGill, argued that the commonwealth must negotiate with its creditors or turn to Congress if it wants to restructure debts by forcing investors to accept reduced payments.

The legal tactic is a risky one for the bondholders, who won when the case went to the U.S. Court of Appeals for the 1st Circuit. Conservatives on the Supreme Court are reluctant to support federal preemption of states’ powers. And the liberals on the court — including Sonia Sotomayor, the daughter of Puerto Rican parents — are moved by the island’s plight and puzzled by the law’s language.

The justices seemed to be struggling to square the language of the bankruptcy code with the reality of Puerto Rico’s fiscal crisis, which has the island tottering on the brink of widespread default.

“Why in the world — what explains Congress wanting to put Puerto Rico in this anomalous position of not being able to restructure its debt?” Justice Ruth Bader Ginsburg asked McGill.

Sotomayor also pressed McGill, asking whether Puerto Rico’s “sovereign powers have been cut off.” She asked whether Puerto Rico’s inability to use the bankruptcy code — the way Michigan did when it let Detroit declare bankruptcy — meant that Congress intended to block restructuring deals even if they have the support of almost all the creditors.

McGill said “the choice for states . . . is Chapter 9 or nothing. And the choice for Puerto Rico and the District is come to Congress.”

The case came before the court just as Puerto Rico, an island with about 3.5 million people, is facing almost certain defaults in May and July. A deal negotiated to overhaul the debts of the Puerto Rico Electric Power Authority awaits approval by a small minority of creditors.

Meanwhile, House Speaker Paul D. Ryan (R-Wis.) has asked lawmakers to come up with a solution for Puerto Rico by the end of March. An agreement seems possible that might feature a powerful financial control board, but the power to impose debt restructuring remains a stumbling block.

If the Supreme Court rules in favor of Puerto Rico, that would make it easier for the commonwealth to bargain with its creditors and get better terms in negotiations. It remains unclear how sweeping a law Congress will adopt and how powerful a new financial control board might be.

The justices, however, were wading through the confusing language of the bankruptcy law, which said Puerto Rico was not considered to be the equivalent of a state when it came to the bankruptcy legislation.

Christopher Landau, a lawyer representing Puerto Rico, said that the justices, as they consider the intent of the law, should think that it was “implausible, at best” to think that Congress would preclude Puerto Rico from dealing with utilities that provide basic services such as electricity and clean water to its citizens.

“Both of you have stories,” Justice Elena Kagan said at one point. “It’s just not clear which one of you is right.”

The cases are Puerto Rico v. Franklin CA Tax-Free Trust and Melba Acosta-Febo v. Franklin CA Tax-Free Trust.