Members of the Home Defenders League rally in front of the Bank Of America in San Jose, Calif. Paul Sakuma A unanimous Supreme Court ruled Monday that homeowners who declare bankruptcy can't void a second mortgage even if the home isn't worth what they owe on the primary mortgage.

The justices ruled in two Florida cases that bankrupt homeowners can't "strip off" a second loan even if they are underwater on the first loan.

Both cases involved property owners who were allowed by lower courts to nullify second loans held by Bank of America.

The Atlanta-based 11th U.S. Circuit Court of Appeals affirmed both cases, but Bank of America said the rulings conflicted with Supreme Court precedent.

The company argued that even if the primary mortgage is underwater, that should not affect the lien securing the second loan. The bank said the second loan might be repaid eventually if the property's value rises in the future.

The homeowners said the second loans were worthless.

A man walks near a Bank of America branch in New York's Times Square Decemeber 11, 2008. REUTERS/Brendan McDermid

Bank of America claimed hundreds — and possibly thousands — of homeowners in states covered by the 11th Circuit had moved to void underwater second mortgages since the appeals court endorsed the practice two years ago. Those states include Florida, Georgia and Alabama.

Five of the top nine housing markets with the highest percentage of "seriously underwater" properties were in Florida during the first three months of the year, according to the real-estate-research company RealtyTrac.

The research firm defines seriously underwater as when the combined loan amount secured by the property is at least 25 percent higher than its estimated market value.