Ben Carson is making the most of his remaining months at HUD. On Thursday, the Department of Housing and Urban Development sued Facebook over alleged violations of the Fair Housing Act, charging that the social-media giant engaged in housing discrimination with its targeted ads. “Because of the way [Facebook] designed its advertising platform,” the department said in its filing, “ads for housing and housing-related services are shown to large audiences that are severely biased based on characteristics protected by the Act.” The suit is just the latest legal headache for Facebook, and comes a little more than a week after the company said it would revamp the targeted advertising system that critics say had been used to discriminate on the basis of race, gender, age, zip code, disability status, and other protected characteristics.

According to the suit, the result of an investigation begun by the Obama administration and continued under current HUD secretary Carson, the company has discriminated against protected groups by allowing advertisers to use its data to determine who sees housing ads on its platform. Earlier this month, Facebook said it would revamp how it manages “housing, employment and credit ads” on the platform—a response, C.O.O. Sheryl Sandberg said in a statement, to complaints by lawmakers and civil rights groups. But a Facebook spokesperson told The Washington Post that the company’s settlement broke down when the government sought “unfettered access” to its user base, something the social-media platform was unwilling to allow.

The suit evidently caught the company off guard. “We’re surprised by HUD’s decision, as we’ve been working with them to address their concerns and have taken significant steps to prevent ads discrimination,” a Facebook spokesman told the Post, adding that the company is “disappointed” by the lawsuit, but “will continue working with civil-rights experts” to resolve the issue. For his part, Carson was unambiguous in his criticism. “Facebook is discriminating against people based upon who they are and where they live,” he said in a statement in conjunction with the filing. “Using a computer to limit a person’s housing choices can be just as discriminatory as slamming a door in someone’s face.”

It’s unlikely that the fracas will do much monetary damage to the company, whose bottom line has seemed immune to a constant parade of scandal. It could, however, serve as a warning shot to other tech companies that have been scrutinized for their use of micro-targeted ads, including Twitter, Google, and Amazon. That the Trump administration should fire such a shot at Facebook, seemingly without forewarning, is an indication that bipartisan distaste for the company has only increased. Donald Trump’s own view of Silicon Valley tends to oscillate; on Wednesday afternoon, he tweeted that he “Just met with @SundarPichai, President of @Google,” with whom he “discussed political fairness” on the platform. (In fact, Sundar Pichai is Google’s C.E.O.) That meeting “ended very well!” according to Trump. But as the pressure on big tech ramps up, the president could sour on sites like Facebook and Google as quickly as he did on Twitter.