SAN FRANCISCO — It’s one thing for Uber Technologies Inc. to get sued by its competitors. It’s another for the embattled ride-hailing company to get sued by its drivers. But in a new class action filed in federal court in San Francisco, Uber is getting sued on behalf of its competitor’s drivers.

Lawyers at Audet & Partners in San Francisco and Zimmerman Reed in Manhattan Beach sued Uber on Monday, claiming that the company created spyware to track drivers providing rides on the rival platform run by Lyft Inc.