Fair housing groups filed a federal discrimination lawsuit against Bank of America on Tuesday claiming that the lender unfairly exposed minority communities to more crime, poor quality of life and economic harm by failing to maintain and market its foreclosed homes in predominantly black and Latino neighborhoods.

The complaint filed in U.S. District Court in Maryland asserts that bank-owned homes in communities of color are more likely to have overgrown grass, unsecured doors, and attract health and safety problems compared to better maintained homes located in predominantly white communities.

The complaint is based on an eight-year investigation conducted by the Washington-based National Fair Housing Alliance and several housing groups nationwide, which examined the conditions of more than 1,600 Bank of America-owned foreclosed homes across 37 metropolitan areas, including Prince George’s County and Baltimore. The lawsuit also names as a defendant Safeguard Properties Management, the company that has been in charge of preserving and maintaining properties owned by Bank of America.

“NFHA and the co-plaintiffs filed this lawsuit to make sure that these discriminatory practices come to an end and that perpetrators like Bank of America are held responsible for their unjust policies and practices,” said Lisa Rice, president and chief executive of the National Fair Housing Alliance, in a statement.

In a statement Tuesday, Bank of America said “the allegations are without merit. We apply uniform practices to the management and marketing of vacant bank-owned properties across the U.S., regardless of their location.”

The bank also has questioned the alliance’s methods for investigating properties, replying to allegations of discrimination made in a 2016 complaint to the Department of Housing and Urban Development, that the advocates “faulted the bank for properties that other entities had the responsibility to maintain and market, expressly declined to consider properties under repair, and included properties the bank had agreed to donate to local groups.”

Safeguard said it has yet to be served with the lawsuit but that it “neither condones nor tolerates acts of discrimination or business practices that would unfairly target or neglect certain neighborhoods based on location and demographics.”

“Safeguard remains disappointed by the National Fair Housing Alliance’s (NFHA) continued attack on Safeguard with ill-conceived and disingenuous allegations of an extremely serious nature, and we will again vigorously defend against any and all of NFHA’s allegations,” the company said Tuesday in a statement.

The lawsuit against Safeguard and Bank of America is part of a string of legal actions fair housing advocates have taken against several lenders nationwide that aim to address allegations of discrimination by banks in predominantly African American and Latino communities.

The “discriminatory conduct and perpetuation of residential segregation” has subjected minority neighborhoods to “deteriorating and dilapidated living conditions,” denied residents “opportunities for neighborhood stabilization and economic recovery,” and “harmed in the value of their home investments.”

The lawsuit, similar to others filed in recent years in federal courts in California, specifically claims Bank of America and Safeguard are in violation of the Fair Housing Act of 1968.

Investigators with fair-housing groups across the country regularly visited and photographed Bank of America-owned homes, checking for deficiencies such as trash, overgrown yards, unsecured doors and other signs of neglect, the lawsuit states. They found, it said, that homes in communities of color were more likely to have boarded-up windows and doors, littered yards and unruly lawns.

The lawsuit contends about 46 percent of Bank of American-owned homes in minority communities had 10 or more deficiencies compared to 17 percent in predominantly white neighborhoods.

Investigators repeatedly visited homes over the course of years but often found the conditions did not improve or worsened. They also checked to see whether the home was being marketed for sale as a way to gauge whether it might stand vacant so long the blight would worsen, and banks are failing to do that sales marketing, the lawsuit claims.

“The failure to maintain real estate owned by banks in minority communities is a continuation of the well-documented history of residential discrimination against minorities and minority neighborhoods in this country by many financial institutions,” the lawsuit asserts.