The civil charges filed by the Department of Housing and Urban Development could cost the social network millions of dollars in penalties. But more than that, they strike at the heart of Facebook's business model — its vaunted ability to deliver ads with surgical precision to certain groups of people and not others.
"Facebook is discriminating against people based upon who they are and where they live," HUD Secretary Ben Carson said. "Using a computer to limit a person's housing choices can be just as discriminatory as slamming a door in someone's face."
In a statement, Facebook expressed surprise over the charges, saying it has been working with HUD to address its concerns and has taken steps to prevent discrimination, including eliminating thousands of ad-targeting options last year that could be misused by advertisers.
Just last week, Facebook agreed to overhaul its targeting system and abandon some of the practices singled out by HUD to prevent discrimination, not just in housing listings but in credit and employment ads as well. The move was part of a settlement with the American Civil Liberties Union and other activists.
"We're disappointed by today's developments, but we'll continue working with civil rights experts on these issues," the company said.
The HUD charges were seen as a possible prelude to a wider regulatory crackdown on the digital advertising industry, which is dominated by Facebook and Google. And the case was yet another blow to Facebook, which has come under siege from lawmakers, regulators and activists and is under investigation in the U.S. and Europe over its data and privacy practices.
HUD spokesman Brian Sullivan said the agency has reached out to Google and Twitter to "better understand their advertising practices." But he said neither is currently under investigation. Twitter says it doesn't allow discriminatory advertising, while Google says its policies prohibit targeting ads based on sensitive categories such as race, ethnicity and religious beliefs.
Google, in particular, has ad-targeting options similar to Facebook's.
The technology at the center of the clash with HUD has helped make Facebook rich, with annual revenue of close to $56 billion. Facebook gathers enormous amounts of data on what users read and like and who their friends are, and it uses that information to help advertisers and others direct their messages to exactly the crowd they want to reach.
HUD said Facebook is allowing advertisers to practice a sort of high-tech form of red-lining by excluding people in entire neighborhoods or ZIP codes from seeing their ads. The company was accused, too, of giving advertisers the option of showing ads only to men or only to women.
Facebook also allegedly allowed advertisers to exclude parents; those who are non-American-born; non-Christians; and those interested in Hispanic culture, "deaf culture," accessibility for the disabled, countries like Honduras or Somalia, or a variety of other topics.
The case will be heard by an administration law judge unless HUD or Facebook decides to move it to federal court.
"The nature of their business model is advertising and targeted advertising, so that is a slippery slope. That is their business model," said Dan Ives, an industry analyst with Wedbush Securities. "The government launched this missile and caught many in the industry by surprise."
Ives said the move may mean U.S. regulators are taking broader aim at the digital advertising market. "This is a clear shot across the bow for Facebook and others," he said.
Galen Sherwin of the ACLU likewise warned: "All the online platforms should be paying close attention to these lawsuits and taking a hard look at their own advertising platforms."
Facebook is already under fire for allowing fake Russian accounts to buy ads targeting U.S. users and sow political discord during the 2016 presidential election. The company has also been criticized for allowing organizations to target groups of people identified as "Jew-haters" and Nazi sympathizers.
HUD brought an initial complaint against Facebook in August. Facebook said in its statement that it was "eager to find a solution" but that HUD "insisted on access to sensitive information — like user data — without adequate safeguards."
In its settlement with the ACLU and others, Facebook said it will no longer allow housing, employment or credit ads that target people by age, gender or ZIP code. It said it will also limit other targeting options so that these ads don't exclude people on the basis of race, ethnicity and other legally protected categories, including sexual orientation.
"Unless and until HUD can verify that there is an end of the discriminatory practices, we still have a responsibility to the American people," said Raffi Williams, deputy assistant HUD secretary.
Ortutay reported from San Francisco. AP Business Writer Michelle Chapman in Newark, New Jersey, and AP Technology Writer Rachel Lerman in San Francisco contributed to this report.