The US Department of Housing and Urban Development has accused Facebook Inc. alleging that the company’s targeted advertising is discriminated by race and color, in violation of the US Fair Housing Act.

In a statement, Facebook said, “It was an unexpected decision. We have been working with HUD to address its concerns and have taken significant steps to prevent advertising discrimination across its platforms. We would overhaul its ad-targeting system to prevent discrimination not just in housing listings but in credit and employment ads as well, as part of a settlement with the American Civil Liberties Union, the National Fair Housing Alliance and other groups.”

HUD brought a complaint against Facebook in August. The agency charged Facebook for allowing advertisers to exclude parents, non-American-born, non-Christians, and those interested in Hispanic culture. They also noticed the issue of non-accessibility for the disabled and a variety of other topics.

HUD said “Facebook is allowing advertisers to exclude people based on their neighborhood by drawing a red line around those areas on a map. The company is accused of giving advertisers the option of showing ads only to men or only to women”.

Administration law judge will hear the case unless HUD or Facebook decides to move it to federal court. HUD said Facebook was breaking the law by restricting who can view housing-related adverts on its site, which the department said: “unlawfully discriminates based on race, color, national origin, religion, familial status, sex, and disability.”

Facebook said it was surprised by the decision and has been working with HUD to address its concerns. It claims to have taken significant steps to prevent advertising discrimination across its platforms.