NEW YORK (CNNMoney) - The Department of Housing and Urban Development is accusing Facebook of violating the Fair Housing Act.
The agency filed a formal complaint against the social media company on Friday, alleging that it allows landlords and home sellers to use targeted Facebook ads to discriminate against potential buyers or tenants on the basis of race, sex, religion, disability and other characteristics.
"When Facebook uses the vast amount of personal data it collects to help advertisers to discriminate, it's the same as slamming the door in someone's face," Anna María Farías, assistant secretary for fair housing and equal opportunity, said in a statement.
"There is no place for discrimination on Facebook; it's strictly prohibited in our policies," a Facebook spokesperson said in a statement. "Over the past year we've strengthened our systems to further protect against misuse... and we'll continue working directly with HUD to address their concerns."
The federal Fair Housing Act prohibits home rental and sale advertisements from discriminating "based on race, color, religion, sex, handicap, familial status, or national origin."
In its complaint, the federal housing agency outlined several ways landlords or sellers can use Facebook ads to do just that. They could, for example, decide to show the ads to only men, or ensure that their ads don't appear in the feeds of anyone with "accessibility" listed as an interest.
The National Fair Housing Alliance made the same argument in a lawsuit against the social media company. The federal suit, filed in March in New York City, claims that Facebook's advertising tools continue to allow marketers to exclude women and families with children from seeing certain housing ads.
— CNN's Seth Fiegerman contributed to this report.