Eduardo Martinez with the Richmond Recreation and Parks commission walks down an alley with several foreclosed homes during a bus tour of foreclosed and blighted properties on July 13, 2012 in Richmond, California. - 

A novel plan by one city to use eminent domain to rescue underwater mortgages has sparked a lawsuit by major banks. The complaint filed in federal court yesterday is against the working class city of Richmond, California, a suburb of San Francisco, where nearly half of homeowners' mortgages are underwater.

Since the mortgage crisis, homeowners all over Richmond are underwater -- meaning they're stuck in mortgages where they owe way more than their house is currently worth. If the banks won't refinance or modify the loan -- and often they can’t or won't -- the next step is commonly foreclosure.

In order to stem a tide of more foreclosures, the city of Richmond recently approached lenders of more than 600 underwater mortgages and offered to buy the loans at their much lower current market value. The city says it will then help homeowners refinance in order to keep its citizens in their homes. If the banks refuse Richmond's offer, the city plans to use eminent domain to force a sale.

Wells Fargo and Deutsche Bank, two of the banks involved in the lawsuit, argue that the plan would hurt their investors -- everyone from big Wall Street firms to retirees with pensions. The banks also say using eminent domain would be unconstitutional because it's not for a "valid public purpose," and instead would benefit a small group of Richmond citizens and the company that's coordinating the plan, at the expense of out-of-state investors.

Richmond is the first city to try using eminent domain to help underwater homeowners, but others -- like Newark, Seattle, and North Las Vegas -- are paying close attention to what happens in Richmond. The case will be a key legal test for all these cities.

Underlying the case is a deeper question -- what really is a “valid public purpose”? In eminent domain cases, usually it's homeowners who are the ones who lose out, when municipalities build something like a freeway or a sports stadium. In this case, the city is arguing that the public good is the benefit to the local economy of keeping homeowners in their homes.

Follow Krissy Clark at @@kristianiaclark