Tech giant Facebook has reportedly been charged with housing discrimination by HUD based on ads that allegedly violate the Fair Housing Act. HUD Secretary Ben Carson said, “Facebook is discriminating against people based upon who they are and where they live.”

The Verge reports that HUD filed charges against Facebook recently for housing discrimination based on a complaint filed in August which alleges that Facebook has served ads violating the Fair Housing Act.

HUD Secretary Ben Carson said in a statement: “Facebook is discriminating against people based upon who they are and where they live. Using a computer to limit a person’s housing choices can be just as discriminatory as slamming a door in someone’s face.” HUD General Counsel Paul Compton added, “Even as we confront new technologies, the fair housing laws enacted over half a century ago remain clear—discrimination in housing-related advertising is against the law. Just because a process to deliver advertising is opaque and complex doesn’t mean that it exempts Facebook and others from our scrutiny and the law of the land. Fashioning appropriate remedies and the rules of the road for today’s technology as it impacts housing are a priority for HUD.”

The discrimination issue was first raised by ProPublica in 2016 when reporters at the outlet found that an advertising tool called “ethnic affinities” could be used to remove black or hispanic Facebook users from seeing certain ads in their newsfeed. If ads related to housing or employment opportunities used the ethnic affinities tool to exclude users of certain races, this could violate federal law. Facebook had no safeguards in place at the time to prevent this targeting.

Following ProPublica’s reporting, Facebook pledged to address the issue of discriminatory advertising but a followup report in 2017 found that many of the same problems were still an issue on the platform. The complaint from HUD claims that Facebook’s advertising options for excluding certain audiences in incredible direct and even includes a map tool that allows advertisers to prevent Facebook users from certain areas from seeing their ads.

“[Facebook] has provided a toggle button that enables advertisers to exclude men or women from seeing an ad, a search-box to exclude people who do not speak a specific language from seeing an ad, and a map tool to exclude people who live in a specified area from seeing an ad by drawing a red line around that area,” the complaint states.

A Facebook spokesperson told the Verge that the company is already working on these issues stating: “We’re surprised by HUD’s decision, as we’ve been working with them to address their concerns and have taken significant steps to prevent ads discrimination. Last year we eliminated thousands of targeting options that could potentially be misused, and just last week we reached historic agreements with the National Fair Housing Alliance, ACLU, and others.”

The spokesperson added: “Even as we confront new technologies, the fair housing laws enacted over half a century ago remain clear.” In August, Facebook removed 5,000 specific advertising targeting options from their platform stating: “While these options have been used in legitimate ways to reach people interested in a certain product or service, we think minimizing the risk of abuse is more important.”

The HUD complaint appears to take issue with the very nature of optimized advertising as well as possible discriminatory practice by Facebook advertisers, stating: “[Facebook]’s ad delivery system prevents advertisers who want to reach a broad audience of users from doing so. Even if an advertiser tries to target an audience that broadly spans protected class groups, [Facebook]’s ad delivery system will not show the ad to a diverse audience if the system considers users with particular characteristics most likely to engage with the ad.”

Facebook has claimed that discussions with HUD have broken down over disputes related to access to Facebook user data: “While we were eager to find a solution, HUD insisted on access to sensitive information — like user data — without adequate safeguards,” a Facebook spokesperson said. “We’re disappointed by today’s developments, but we’ll continue working with civil rights experts on these issues.”