Facebook advertisers can exclude specific racial and ethnic groups, according to a Pro Publica report.

Using a designation called "Ethnic Affinities," Facebook lets advertisers target and exclude Facebook users.

Pro Publica placed a "house for sale" ad that excluding African Americans, Asian Americans and Hispanics. The exclusion could violate federal anti-discrimination housing laws.

Facebook told Pro Publica it bans advertisers from using "Ethnic Affinities" to discriminate against racial or ethnic groups.

In a blog post, Christian Martinez, head of multicultural at Facebook, says this kind of targeting makes advertising more relevant to diverse communities.

"Living in the US, most of the advertising that I see in traditional media is targeted to people in the majority — people who don’t look like me, who don’t speak Spanish, and who may not share my experience. The experience of ads constantly reminding you that you’re different from the majority is incredibly marginalizing, and it’s not right. Advertising should empower you to learn about things that are relevant to you, that speak to you, that reflect you and your community. It’s also empowering to see content that validates your community as one worth reaching," Martinez wrote.

Further, Facebook is not alone in offering this kind of multicultural micro-targeting, Martinez said.

"Most of the leading companies in the online ad space offer multicultural advertising options. Facebook gives advertisers the ability to reach people whose likes and other activity on Facebook suggest they’re interested in content relating to particular ethnic communities — African American, Hispanic American and Asian American," Martinez said.

But, says Martinez, an advertiser trying to reach a diverse community is very different from "negative exclusion" such as an apartment building that won't rent to black people or an employer that only hires men.

"Our ad policies strictly prohibit this kind of advertising, and it’s against the law," Martinez wrote. "If we learn of advertising on our platform that involves this kind of discrimination, we will take aggressive enforcement action. We also realize that, as a website, we often aren’t in a position to know the details of an apartment rental or job application — and so we will also remove an ad from our platform if the government agency responsible for enforcing discrimination laws tells us that the ad reflects illegal discrimination."

Facebook does not ask users about race but personal data it collects permits advertisers to target niche groups.