Following scrutiny over the practice, Facebook says it will stop allowing certain ads from targeting users based on race.

Company will turn off option for housing, employment, and credit ads

As first reported at USA Today, Facebook will no longer allow ads based on "ethnic affinity" in three advertising areas. "We are going to turn off, actually prohibit, the use of ethnic affinity marketing for ads that we identify as offering housing, employment, and credit," the company told the publication. The company said in a statement that it will require advertisers to make new agreements to not discriminate with ads, and is planning to release new materials "to help advertisers understand their obligations."

"We are making these changes to deter discrimination and strengthen our ability to enforce our policies," Facebook said in the statement. "We look forward to finding additional ways to combat discrimination, while increasing opportunity, and to continuing our dialogue with policymakers and civil rights leaders about these important issues."

Although it has offered the targeting options for two years, Facebook first came under fire last month, after a ProPublica investigation outlined the practice, and showed how it may conflict with federal housing law. Lawmakers soon responded, calling on Facebook to change its policies.

Facebook defended the practice at the time. "This kind of communication is positive: it reflects an advertiser’s respect for the diverse communities it is trying to reach," the company said in response. "But it’s important to know that there’s also negative exclusion — for example, 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."

Facebook first defended the practice after it gained attention

Other digital advertising companies offer some form of demographic-based ads, although not necessarily based on race, and the practice is not inherently illegal. But both ProPublica and lawmakers pointed to the Fair Housing Act, meant to curb discrimination in housing, as one place where Facebook may have overstepped the law. Last week, users filed a proposed class action suit against the company, claiming it enabled illegal discrimination through the practice.