(Bloomberg) -- Uber Technologies Inc. was accused in a lawsuit of violating the U.S. Civil Rights Act by firing minority drivers based on how they’re rated by customers.

“Uber is aware that passengers are prone to discriminate in their evaluation of drivers, but Uber has continued to use this system, thus making it liable for intentional race discrimination,” former driver Thomas Liu said in his complaint, filed Monday in San Francisco federal court on behalf of a proposed nationwide class of nonwhite drivers.

Liu first brought that claim four years ago to the U.S. Equal Employment Opportunity Commission, which did not reach a conclusion about the allegations but in August authorized him to pursue them in court.

Uber prompts customers to rate drivers on a scale of 1 to 5 stars, and then “deactivates” workers whose average rating it deems unsatisfactory, according to the lawsuit. Liu says that while driving for Uber in San Diego, he experienced signs of bias such as customers canceling when they saw his photograph, or asking in an unfriendly manner “where he was from,” and then Uber terminated him in October 2015 because his average customer rating fell below its minimum of 4.6.

While Uber insists its drivers are independent contractors, who aren’t covered by the workplace protections of the Civil Rights Act, the lawsuit contends the ride-hailing giant wields enough control and relies enough on the drivers’ labor that they’re actually employees who fall under the 1964 law.

Uber didn’t immediately respond a request for comment.

©2020 Bloomberg L.P.