The suit by the Deputy Sheriffs' Association of Santa Clara County accuses Smith of violating government code by filling "pay jobs," which are shifts to provide law enforcement services to private groups running concerts, sporting events, conventions and other large gatherings, with reserve deputies as opposed to full-time deputies.

Under government code, reserve deputies, who are employees such as retired officers who volunteer their time to assist the sheriff's office, can only be scheduled for the jobs if no full-time deputies are available, according to the suit.

The reserve deputies are paid less for the jobs compared to full-time deputies, the lawsuit alleges.

The complaint also alleges the sheriff charged private entities a fee to pay off taxes under federal Social Security laws, but the money hasn't been turned over to the federal government and as a result the deputies haven't received credit for their work.

"This is just the latest political stunt from a few disgruntled union bosses. It's simply untrue," Smith said in a statement responding to the lawsuit.

In 2012, the sheriff allegedly lowered the pay job rate to $40.62 an hour without negotiating with the union, but before then deputies were paid one-and-a-half times their hourly rate, according to the suit.

In June 2015, lawyers representing the union turned to county officials over concerns that the sheriff violated other government codes by moving forward with the pay jobs without approval from the Board of Supervisors, not presenting the contracts in a public hearing, not negotiating the pay job rates and arranging pay jobs for deputies in other county departments, according to the suit.

Two months later, the sheriff issued a letter saying that deputies represented by the union wouldn't be scheduled to work pay jobs, the suit alleges.

The lawsuit seeks injunctive and declaratory relief and a writ of mandate, in addition to damages and interest in an amount determined in court.