Updated

Facebook advertisers can now exclude racial and ethnic groups when creating a housing ad on the social media site, according to a report from ProPublica.

The feature, called “ethnic affinities," lets advertisers exclude certain groups of Facebook users. Under the federal Fair Housing Act, people are prohibited from discriminating based on race, gender, religion and other factors.

ProPublica created an ad aimed at house hunters and got it approved in 15 minutes despite excluding African-Americans, Asian-Americans and Hispanics. Facebook declined to comment to the site about its approval.

When ProPublica told prominent civil rights lawyer John Relman about the feature, he called it "horrifying" and "massively illegal."

"This is about as blatant a violation of the federal Fair Housing Act as one can find," Relman said.

Steve Satterfield, Facebook's privacy and public policy manager, told ProPublica that use of the site's “Ethnic Affinity” tool is not the same as discriminating based on race.

Satterfield added the “Ethnic Affinity” option was created over the past two years during a so-called multicultural advertising effort. Facebook believes multicultural advertising helps advertisers target users with an array of interests across different communities.

"Everyone benefits from access to content that’s more relevant to them," Christian Martinez, Head of Multicultural for Facebook wrote in a blog post. "But this is especially critical for people who choose to affiliate with ethnic communities.”

“This kind of communication is positive: it reflects an advertiser’s respect for the diverse communities it is trying to reach," Martinez continued. "But it’s important to know that there’s also negative exclusion ... 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."

Click here to read more from ProPublica.