AUBURN – To catch a suspected drug dealer, police sometimes spend months working undercover and gathering evidence. Then there are times when all it takes is a couple of police officers riding their patrol bikes in the shadows.

A Lewiston man was arrested on Chestnut Street in Auburn late Tuesday and charged with trafficking in crack cocaine. Police said the suspect was riding around on his own bike, trying to sell 21 grams of crack near an elementary schoolyard.

Luis Angel Ramirez, 21, of 45 Shawmut St., was charged with aggravated trafficking in crack after he rode up to an officer, police said.

While Ramirez was being questioned in Auburn, Lewiston police crossed the bridge to arrest him on a charge of assaulting a 2-year-old child and a woman in that city.

It started just after 9 p.m. Tuesday when a caller reported that a man was pedaling around Chestnut Street offering to sell crack cocaine to people in the area, officials said.

Instead of sending a police cruiser to the neighborhood, officers Barry Schmieks and Scott Mercier rode to the area on patrol bikes with a description of the suspect. Investigators said shortly after the cops arrived, a man fitting that description rode up to Schmieks before recognizing him as an officer.

“Officer Schmieks was able to locate the suspect mostly due to the fact that he was patrolling on a mountain bike, which is much more low profile and covert than a cruiser,” said police Lt. Jason Moen.

According to a police report, Ramirez at first gave police a fake name. When Officer Mercier spotted a wallet in the suspect’s back pocket, however, Ramirez’s true identity was learned, police said. It was also learned that Ramirez was on probation.

Before proceeding, the officers contacted a probation officer who authorized them to question Ramirez on a probation violation. During the course of the questioning, the suspect emptied his pockets and revealed a baggy containing 21 grams of crack, police said.

Ramirez was charged with aggravated drug trafficking because he was allegedly caught with the crack cocaine within 1,000 feet of Webster School. He was then charged by Lewiston police with assault and domestic assault.

According to an arrest report, Ramirez was accused of assaulting a 2-year-old girl and a 21-year-old woman on Bates Street last week. Lewiston police had been searching for him since the alleged attacks were first reported June 18.

Moen commended the way Schmieks and Mercier approached the complaint and the way they handled the questioning and arrest of Ramirez.

“It was good police work all around,” he said. “I was impressed with both of them.”

Ramirez remained at the Androscoggin County Jail Wednesday night.