A federal judge has dismissed the city of Miami’s mortgage discrimination lawsuit against Bank of America Corp., handing the city its first defeat in four suits that accuse major banks of U.S. Fair Housing Act violations.

In a ruling on Tuesday that could affect similar legal actions by other localities, U.S. District Judge William Dimitrouleas said Miami did not have standing to sue under the 1968 law, passed to prevent discrimination and assure fair housing nationwide.

Wells Fargo & Co., Citigroup Inc. and JPMorgan Chase & Co. are also facing lawsuits by Miami for allegedly targeting minorities for subprime loans that defaulted en masse during the last decade’s housing crisis.

The ruling could also have implications for at least a dozen similar suits filed by U.S. cities and counties, including Los Angeles; Miami Gardens, Fla.; and DeKalb County, Ga.

“We believe the correct determination was made in the Miami case,” Bank of America spokesman Rick Simon said.

“We responded with urgency to rising mortgage defaults that resulted from the country’s severe economic downturn, which the Miami suit all but ignored,” he said.

Lawyers and a spokesman for the city of Miami did not immediately respond to a request for comment.

Miami had accused the banks of giving minorities loans they could not afford, which the city said led to foreclosures, lower property values and neighborhood blight.

The city sued to recover lost property tax revenue and increased expenses for the city in neighborhoods with vacant properties.

The damages are “so marginally related” to the purpose of the Fair Housing Act that it cannot be assumed that Congress intended to permit the city’s lawsuit, the judge ruled.

The city’s alleged harm was also too remote from the bank’s conduct to bring a suit, the judge said.

“Against the backdrop of a historic drop in home prices and a global recession,” the city had not traced foreclosures to Bank of America’s actions, the judge said.

Leader In Zombie Foreclosures

Filed in December, the lawsuit accused Bank of America of a “continuous pattern and practice of mortgage discrimination in Miami” since at least 2004.

The lawsuit said Florida, and Miami in particular, had been devastated by the foreclosure crisis. As of October 2013, Florida had the country’s highest foreclosure rate, and Miami had the highest rate among the 20 largest metropolitan statistical areas in the country, according to the lawsuit.

Florida was by far the leading state in the country with owner-vacated, or “zombie,” foreclosures, the suit said.

In Tuesday’s ruling, Dimitrouleas said Bank of America was not responsible for the actions of “intervening actors such as squatters, vandals or criminals that damaged foreclosed properties” and caused the city’s costs to rise.

The case is: City of Miami v Bank of America Corp, U.S. District Court, Southern District of Florida, No 13-24506.

(Reporting by Dena Aubin in New York; Editing by Kevin Drawbaugh and Jeffrey Benkoe)