Facebook ran into trouble late last month when a ProPublica report revealed that the social media company allowed advertisers to exclude people from their ad campaigns based on their race. Such practices could potentially run afoul of the The Fair Housing Act of 1968 — making Facebook in violation of the law. USA Today reports that after initially denying the company was doing anything wrong, a Facebook spokesperson has now confirmed that advertisers will no longer be able to exclude groups from advertisements based on their perceived race in cases involving housing or employment.

"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," Facebook vice president of U.S. public policy Erin Egan told the paper.

Taking an even further step, the company now says it will require advertisers to affirm they are not discriminating when placing housing posts. This is a sharp turnaround for Facebook, which just a few weeks ago denied that it even knew the race of its users. Facebook's privacy and public policy manager, Steve Satterfield, said the relevant data collected on users, termed “Ethnic Affinity,” was something entirely different than race. Different Ethnic Affinity categories included "African American," "Asian American," and "Hispanic."

“We take a strong stand against advertisers misusing our platform: Our policies prohibit using our targeting options to discriminate, and they require compliance with the law,” he said at the time. “We take prompt enforcement action when we determine that ads violate our policies."

Egan says the changes resulted from "constructive dialogue" with organizations like American Civil Liberties Union and the National Fair Housing Alliance. Whether that dialogue included someone from the ACLU saying "you are going to be sued over this" is unclear.

Previously: Facebook Allows Advertisers To Exclude Users Based On Their Race