The Trump administration charged Facebook on Thursday with "discrimination" in its advertising practices for housing.

The Department of Housing and Urban Development is seeking damages for any person who was harmed by Facebook's advertising policies, which until recently allowed employers and landlords to limit their audiences on the basis of race, ethnicity or gender. Facebook settled a lawsuit with the ACLU over the practice last week and overhauled its systems as a result.

"[Facebook] holds out its advertising platform as a powerful resource for advertisers in many industries, including housing and housing-related services," the complaint says. But, "because of the way [Facebook] designed its advertising platform, ads for housing and housing-related services are shown to large audiences that are severely biased."

HUD is asking for unspecified monetary damages and "the maximum civil penalty" against Facebook for each violation of housing laws.

A Facebook spokesperson said the company is surprised by HUD's charge.

"While we were eager to find a solution, HUD insisted on access to sensitive information — like user data — without adequate safeguards," the spokesperson said. "We're disappointed by today's developments, but we'll continue working with civil rights experts on these issues."

Facebook also pointed to a blog post published last week, in which the company said the advertising overhaul marked an important step for the platform and thanked the civil rights organizations that helped improve the ad tools.

"There is a long history of discrimination in the areas of housing, employment and credit, and this harmful behavior should not happen through Facebook ads," COO Sheryl Sandberg said at the time. "Our policies already prohibit advertisers from using our tools to discriminate. We've removed thousands of categories from targeting related to protected classes such as race, ethnicity, sexual orientation and religion. But we can do better."

Facebook has drawn harsh criticism for its ad-based business model in recent months. The service allows advertisers to customize their audience based on specific and often user-supplied criteria for demographics and stated interests. That's how advertisers were able to target posts to "Jew-haters," for example.

The self-service portal is also how Russian agents were able to purchase tens of thousands of dollars worth of inflammatory posts around U.S. elections.