A Stamford man was arrested for possession of narcotics with intent to sell at the Ridgefield Police Department around 9 p.m. Tuesday, April 10.

Ridgefield police said William Garcia-Perez, 35, was pulled over for texting while driving on Farmingville Road. “Due to the circumstances at the scene,” a police report said, the officers called for the department K-9 officer, Loki.

After the police dog detected a narcotic oder coming from the car, officers searched inside the vehicle and found 8.5 grams of crack cocaine and 2.5 grams of marijuana.

Capt. Jeff Kreitz said that the charge for intent to sell the narcotics was based on the “quantity and packaging” of the crack cocaine.

Garcia-Perez was also charged for driving with a suspended license, using a cell phone while operating a motor vehicle, possession of narcotics, and possession of less than one-half ounce of marijuana, the report said.

Garcia-Perez was processed at police headquarters and released after posting a $5,000 bond. He is scheduled to appear in Danbury Superior Court on Tuesday, April 24.

Garcia-Perez’s car was towed from the scene, the report said.