The Department of Housing and Urban Development (HUD) on Friday filed a formal complaint against Facebook alleging that it illegally allows real estate sellers to restrict their advertisements by characteristics such as race.

"The Fair Housing Act prohibits housing discrimination including those who might limit or deny housing options with a click of a mouse," Anna María Farías, HUD’s assistant secretary for fair housing and equal opportunity, said in a statement

"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," she added.

ADVERTISEMENT The complaint alleges that Facebook's advertising platform allows sellers to exclude wide swaths of protected classes from seeing their housing ads.