(Bloomberg) -- A Puerto Rico law that would have forced investors in some public corporations to accept unfavorable restructuring terms was thrown out in a lawsuit brought by holders of power utility bonds.

Investment funds of Franklin Resources Inc. and OppenheimerFunds Inc., which hold more than $1.5 billion in bonds issued by the Puerto Rico Electric Power Authority, convinced a federal judge in San Juan that bankruptcy law and the US Constitution trump the commonwealth's legislation.

The law, passed under threat of a fiscal emergency, would have allowed public utilities such as the power authority, or Prepa, to negotiate with bondholders to reduce their debt loads, potentially forcing investors to accept unfavorable terms, according to the funds' complaint.