A man waves a national flag as protesters march through San Juan May 13, 2015. University students and employees took to the streets to protest against government plans to implement cuts to public university budgets, according to local media. Reuters/Alvin Baez (Reuters) - A US federal appeals court affirmed a lower court decision to strike down Puerto Rican legislation aimed at granting local municipalities the right to enter bankruptcy, but said excluding the US territory's public entities from federal bankruptcy law was unconstitutional.

Puerto Rico passed the so-called Recovery Act last year to give certain public corporations, with around $20 billion in debt, the ability to restructure financially in an orderly process. Puerto Rico is currently struggling with a total debt load of around $72 billion, which it says it is unable to pay.

"Besides being irrational and arbitrary, the exclusion of Puerto Rico's power to authorize its municipalities to request federal bankruptcy relief should be re-examined in light of more recent rational-basis review case law," the U.S. Court of Appeals for the First Circuit said in the ruling late on Monday.

The Recovery Act was struck down by a federal court in Puerto Rico in February after bondholders in the island's power authority, including Franklin Advisers, OppenheimerFunds and Blue Mountain Capital, argued in a law suit that the legislation contravened the U.S. bankruptcy code, which expressly excludes Puerto Rico.

While the 75-page ruling ostensibly vindicates the bondholders' position, it also makes a forceful case that Puerto Rico should be given access to Chapter 9 of the U.S. bankruptcy code, which deals with municipal bankruptcies. Bondholders have consistently opposed this view.

The in-depth ruling, steeped in legislative history, will strengthen the case for Congress to act on a bill, currently before a House committee, that seeks to change Chapter 9 to treat Puerto Rico like any other state for the purposes of bankruptcy.