RANCHO CORDOVA, Calif. (KTXL) — Rancho Cordova police said officers arrested a man on drug-related charges after stopping him for vehicle code violations. 

Police said the officers were on patrol on Aug. 30 when they spotted a car with code violations. They pulled the car over and learned the driver was on probation. 

A search was done, and the officers said they found 39 small bags with methamphetamine, some heroin and three small containers of fentanyl. They said they also found a machete and baseball bat.

According to police, the driver allowed officers to search his phone, and they found evidence that he was selling drugs to Rancho Cordova residents. 

He was arrested and booked into the Sacramento County Main Jail on charges relating to narcotic sales and weapons violations.