Hundreds of thousands of Americans drive for Uber. And the company is looking for many more. It runs ads on Facebook that say, for example, “Driving toward something? Make extra money when it works for you and get there faster.” Another touts, “Earn $1,100 in Nashville for your first 200 Trips. Limited time guarantee! Terms apply.”

There’s just one catch: Many of those ads are not visible to women.

A ProPublica review of Facebook ads found that many purchased by Drive with Uber, the company’s recruiting arm, targeted only men in more than a dozen cities across the US. Our survey of 91 Uber ads found just one targeting only women; three did not target a specific sex.

They were all gathered as a part of our Facebook Political Ad Collector project, in which readers sign up to send us the ads they see in their News Feeds.

The review found Uber to be among 15 employers in the past year who have advertised jobs on Facebook exclusively to one sex. Many of the ads seem to target in accordance with stereotypes. The Pennsylvania State Police, for example, boosted a post targeted to men with text saying “Pennsylvania State Troopers earn a starting salary of $59,567 per year. Apply now.” A Michigan-based truck company took out ads targeting not just men, but men interested in college football. And a community health center in Idaho sought nurses and certified medical assistants—and limited its audience to women.

The Supreme Court ruled in 1973 that it is illegal for an employer to take out job ads in newspapers with parameters such as “Help wanted—men.”

“The ads themselves are illegal,” Galen Sherwin, an ACLU lawyer, said. “It’s been established for five decades.”

The ACLU, the Communications Workers of America and the firm Outten & Golden filed a complaint with the Equal Employment Opportunity Commission on Tuesday about Facebook’s practices. The filing, which is the first step before filing a lawsuit, names 10 employers who had advertised jobs only to men. The complaint argues that Facebook itself has broken the law by publishing the ads.

In a statement, Facebook spokesman Joe Osborne said, “There is no place for discrimination on Facebook; it’s strictly prohibited in our policies. We look forward to defending our practices once we have an opportunity to review the complaint.”

The company has previously said that giving advertisers the ability to target employment ads by sex and age does not facilitate discrimination.

In response to other suits, Facebook has argued that it is not liable for the content its users—in this case, advertisers—post on its platform.

In response to questions about the breakdown of its ads that target a specific sex, an Uber spokesperson said, “Driving with Uber is not typical 9 to 5 work, and the platform is available to anyone who is qualified—regardless of gender.” The spokesperson added, “We use a variety of channels to reach prospective drivers—both offline and online—with the goal of enabling more people, not fewer, to earn on their own schedule.”

Other advertisers say they use such tactics as part of larger recruiting efforts that include ads targeting men and women. ProPublica found an ad by Johnsonville Sausage, for example, targeting men ages 18 to 60 who are interested in hunting, but the company says it is only one ad in a greater recruiting campaign for men and women. Ryan Tarkowski, communications director for the Pennsylvania State Police, says their Facebook ad targeting men was part of a larger recruitment campaign that also targeted women and other groups.

Targeting by sex is just one way Facebook and other tech companies let advertisers focus on certain users—and exclude others. Based on rich data provided by users and deduced from their Web activity, that powerful targeting is key to Facebook’s massive popularity with advertisers, and it accounts for much of its revenue. It lets advertisers spend only on those they want to reach.

That level of targeting also gives advertisers the power to discriminate in ways that may violate the law. ProPublica reported in 2016 that Facebook allows advertisers to exclude users by race. And last year we detailed how job ads on Facebook can exclude older workers.

Since our reporting, Facebook has removed the ability for advertisers to exclude certain categories of people by race, religion and national origin. Facebook has not made similar changes for age and sex.

Facebook also now has humans review certain ads that include or exclude people in ways that implicate “politics, religion, ethnicity or social issues.” Facebook wouldn’t say if it considers job ads targeted by sex to be sensitive enough to trigger manual review, citing concerns about “bad actors.”

In some instances, companies appear to be targeting job ads by sex in order to diversify their workforce or address disparities. ProPublica’s database, for instance, found ads by T-Mobile and Boeing promoting engineering careers to women. Both companies declined to comment.

But the complaint found instances of ads that don’t seem aimed at correcting historic imbalances. It cites ads from 10 traditionally male-dominant industries targeted just at men, including a software company, a moving company, and a police department.

Sometimes, advertisers don’t seem to recognize they’re excluding users by gender. The city of Omaha, for example, advertised a job for a civil rights investigator. Among the duties listed: “investigating discrimination charges” and “processing complaints alleging discrimination in employment.” The ad was set to be shown only to women.

Contacted by ProPublica, Tim Young, human resources director for the city of Omaha, says it was an honest oversight.

“We have a lean staff here,” he said. “Our social media staff is one person. We didn’t realize, and it won’t happen again.”

Amanda Collins, director of outreach and enrollment at HealthWest Inc., the community health center in Idaho that sought nurses and certified medical assistants, also said the targeting was unintentional. She says that women make most health care decisions and that she markets services and events accordingly. When it came time to post the jobs, she suspects Facebook filled in her usual targeting categories and the person who placed the ad didn’t think twice.

“So, it’s an oversight for us but also obviously fairly easy to do,” Collins said. “We would never just completely target those jobs specifically to women.”

NTB Trucking, the Michigan-based company, did not reply to a request for comment.

Facebook has taken some steps to try to address the problem of advertiser confusion through “self-certification.” For more than a year, it has required anyone running ads for jobs to check a box saying their ads stay within all legal boundaries. The company has recently said that it will show a pop-up message to all advertisers asking them to agree to obey the law.

Some attorneys and policy experts think that requirement isn’t enough. “It’s pretty easy for Facebook to stop” this sort of discrimination on their platform, Sherwin said, saying the company should eliminate the option for targeting employment, housing and credit ads by sex. Facebook’s tools, she said, are “the means by which companies are being allowed to do this.”

As an alternative, Facebook should “make it easier for regulators and civil rights groups to see what’s going on,” suggests Miranda Bogen, a senior policy analyst at Upturn, a think tank that researches equity issues in the design and governance of technology.

“Paid messages about housing, employment, and credit deeply implicate civil rights and economic opportunity, and they should be just as visible and accessible as the political ads,” she said, referencing Facebook’s political ad archive database. Regulators, she said, “have very little visibility into the billions of ads that flow across Facebook’s platform every day, and even less into how those ads are targeted, so it’s really hard for them to do their job.”

ProPublica’s database collects only a tiny sample of advertisements on Facebook. But the presence of targeted ads do raise further questions about the scope of the practice.

“If Facebook thought parallel ads—older worker ad, younger worker ad; women ad, men ad—were legal, it should be monitoring these type of exclusionary ads to make sure there is a paired ad,” said Peter Romer-Friedman, an attorney at Outten & Golden who helped file the case. “We don’t know the full picture.”

Here are the job ads ProPublica found that target by sex. We’ve contacted each of the companies and noted their response when they have given one.

Boeing declined to comment.

Tim Young, human resources director for the city of Omaha, says it was an honest oversight. “We have a lean staff here,” he said. “Our social media staff is one person. We didn’t realize, and it won’t happen again.”

An Uber spokesperson said the company uses “a variety of channels to reach prospective drivers—both offline and online—with the goal of enabling more people, not fewer, to earn on their own schedule,” regardless of sex.

Amanda Collins, director of outreach and enrollment at HealthWest Inc., said the targeting was unintentional. She says that women make most health care decisions and that she markets services and events accordingly. She says the targeting categories were likely mirrored by campaigns the company has run.

Johnsonville says it only uses Facebook recruiting to hire for positions that have been hard to fill, and it runs comprehensive ad campaigns that target both men and women.

OneClass Note Taker Program says it abides by Facebook’s guidelines regarding hiring practices and says these are not ads for full or part-time employment. The company says it employs both men and women, all recruited from Facebook ads, organic search, or direct traffic.

Ryan Tarkowski, communications director for the Pennsylvania State Police, says their Facebook ad targeting men was also part of a larger recruitment campaign that included women and other groups with other ads. He says the full strategy is designed to increase diversity among the troopers, and the ads are run by a third-party advertising agency.

T-Mobile declined to comment.

ProPublica is a Pulitzer Prize-winning investigative newsroom. Sign up for their newsletter.