Facebook is still allowing illegal discrimination in housing advertisements, a group of fair housing organizations has alleged in a federal lawsuit.

The suit, filed on Tuesday, claims that despite assurances to the contrary, Facebook is enabling “egregious and shocking” discrimination against families with children, women and people with disabilities in housing ads, in violation of landmark civil rights legislation, the Fair Housing Act.

Facebook vowed to fight the lawsuit, which it said was “without merit”.

The tech giant has ballooned into a $440bn advertising behemoth thanks in large part to the ease by which it allows advertisers to target specific audiences. The company transmogrifies every like, status update and mouse click into a detailed consumer profile, then auctions its users’ attention to advertisers.

The incredible granularity of Facebook’s ad targeting – which includes sensitive information like age and “ethnic affinity” – is attractive to advertisers who don’t want to waste money putting their products in front of people that don’t match their target demographic. But federal civil rights laws ban discrimination on a number of personal characteristics in advertising related to housing, employment and credit.

“Facebook’s platform is the virtual equivalent of posting a for-rent sign that says ‘No families with young kids’ or ‘No women’,” said Fred Freiberg, the executive director of Fair Housing Justice Center, one of the plaintiff organizations. “But it does so in an insidious and stealth manner so that people have no clue they have been excluded on the basis of family status or sex.”

ProPublica first raised concerns about the potential for Facebook’s tools to be used to discriminate in an October 2016 article that showed how advertisers could exclude people with a certain “ethnic affinity” from the audience of a housing advertisement.

Facebook updated its advertising policies in February 2017 to disallow illegal discrimination in housing, employment and credit advertising. At that time, the company said it would use machine learning to help enforce the rules, but also relied on advertisers to “self-certify” compliance.

In November 2017, ProPublica reported that Facebook was still approving housing ads that discriminated against African Americans, Jewish people, Spanish speakers, and other protected groups. A joint investigation by ProPublica and the New York Times also found that Facebook ads were being used to exclude older workers from seeing job listings.

Facebook’s platform is the virtual equivalent of posting a for-rent sign that says ‘No families with young kids’ or ‘No women’ Fred Freiberg, Fair Housing Justice Center

For this lawsuit, the plaintiffs bought several dozen housing ads on Facebook between December 2017 and February 2018. The groups used pre-populated lists of categories suggested by Facebook’s advertising platform to narrow their audience. They found that they were able to exclude parents, women and people who had expressed interest in issues that suggest they are members of a protected class, such as “disability”.

All of the ads were approved in an hour or less, the complaint states.

“There is absolutely no place for discrimination on Facebook,” a Facebook spokesperson said in a statement. “We believe this lawsuit is without merit, and we will defend ourselves vigorously.”

The lawsuit comes at a time of considerable tumult for Facebook. The Observer’s reporting that a political consultancy obtained personal information harvested from the Facebook profiles of 50 million Americans has prompted public outcry and calls for regulation of the company’s data collection and privacy practices.

“Facebook has known for years that its advertising platform violates civil rights laws, but it has refused to change its ways on a voluntary basis,” said Diane Houk, one of the attorneys for the plaintiffs. “Facebook is not above the law and must answer these civil rights claims in court.”