The Department of Housing and Urban Development has filed charges against Facebook for housing discrimination, escalating the company’s ongoing fight over discrimination in its ad targeting system. The charges build on a complaint filed in August, finding that there is reasonable cause to believe Facebook has served ads that violate the Fair Housing Act.

“Facebook is discriminating against people based upon who they are and where they live,” HUD Secretary Ben Carson said in a statement. “Using a computer to limit a person’s housing choices can be just as discriminatory as slamming a door in someone’s face.”

ProPublica first raised concerns over housing discrimination on Facebook in 2016, when reporters found that the “ethnic affinities” tool could be used to exclude black or Hispanic users from seeing specific ads. If those ads were for housing or employment opportunities, the targeting could easily violate federal law. At the time, Facebook had no internal safeguards in place to prevent such targeting.

“We’re disappointed by today’s developments,” Facebook says

Facebook has struggled to effectively address the possibility of discriminatory ad targeting. The company pledged to step up anti-discrimination enforcement in the wake of ProPublica’s reporting, but a follow-up report in 2017 found the same problems persisted nearly a year later.

According to the HUD complaint, many of the options for targeting or excluding audiences are shockingly direct, including a map tool that explicitly echoes redlining practices. “[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 reads.

Reached for comment, a Facebook representative said the company is already working to address the issue outside of court. “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,” the spokesperson. “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.”

“Even as we confront new technologies, the fair housing laws enacted over half a century ago remain clear”

As the statement mentions, Facebook has made a number of recent restrictions to audience targeting in response to these concerns. In August, the company removed 5,000 specific targeting options, including the option to exclude specific ethnicities and religions. “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 company said at the time. More recently, Facebook discontinued the ability to target housing ads by age, gender, or zip code entirely, as part of a settlement with various civil rights groups.

Still, some of the HUD charges seem to take issue with the nature of automatically optimized advertising itself, rather than any specific set of targeting instructions. “[Facebook]’s ad delivery system prevents advertisers who want to reach a broad audience of users from doing so,” one section of the complaint reads. “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.”

According to Facebook, discussions with HUD seem to have broken down over the question of the agency’s level of 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,” the statement continues. “We’re disappointed by today’s developments, but we’ll continue working with civil rights experts on these issues.”

This is the first federal discrimination lawsuit to deal with racial bias in targeted advertising, a milestone that lawyers at HUD said was overdue. “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,” said HUD General Counsel Paul Compton. “Just because a process to deliver advertising is opaque and complex doesn’t mean that it’s exempts Facebook and others from our scrutiny and the law of the land.”