A couple pleaded not guilty to trafficking heroin on Thursday after police stopped a car in Hyannis being driven by one of the suspects and uncovered a backpack filled with drugs and an unlicensed gun in their possession, according to authorities.

Mercedes Pearson, 19, of Plymouth, and her boyfriend, Timothy L. Galvin, 21, of Onset, were arrested Wednesday after a three-day investigation by the Barnstable police narcotics unit, authorities said Friday in a statement.

Galvin pleaded not guilty in Barnstable District Court to 10 charges, including drug possession with intent to distribute, carrying a gun without a license, and probation violation. He was held on $50,000 cash bail.

Advertisement - Continue Reading Below

Police learned Galvin was convicted in May of distributing heroin and cocaine and placed on probation until 2016. A warrant was issued in November after he violated his probation.

Pearson pleaded not guilty to drug possession and trafficking, and conspiracy to violate the narcotics law, and was released on personal recognizance for a future court date, police said.

Two officers from the Barnstable Street Crimes Unit, a multi-jurisdictional police force, first became aware of the suspects after stopping the car Pearson was driving on Monday on Route 132 in Hyannis. Pearson and Galvin were seen earlier parking the gray Nissan Altima in a Cumberland Farms parking lot at about 6 p.m. and entering the store together, police said.

“We watch that parking lot because a lot of street level dealers don’t do it on a dark street, they kind of hide in plain sight,” Barnstable Police Lieutenant John Murphy Jr. said.

The officers became suspicious when Pearson exited the store and drove away in the car alone.

“Cumberland Farms is such a small store that it seemed kind of odd that [Galvin] didn’t come out when she left,” Murphy said. “He went out of a side door that wasn’t in the officer’s view, thinking that we wouldn’t pick up on the fact that he wasn’t in the car.”

Officers checked the vehicle’s registration plates and learned the owner was a Plymouth woman with an outstanding arrest warrant.

Pearson was stopped on Bearses Way, and allegedly gave the officers a fake name. They learned the car belonged to a friend of Pearson’s, and she was arrested for allegedly operating without a license and giving a false name to a police officer. She was released that evening after posting bail, police said.

During a subsequent investigation of the vehicle, police said they found a loaded .25-caliber gun and a cellphone in the pocket of a North Face jacket they suspect belonged to Galvin.

The vehicle was towed to the Barnstable Police Department and a search warrant was executed. Police uncovered a small backpack in the car containing approximately 28 grams of heroin, 3 ounces of marijuana, 3 grams of cocaine, and a digital scale, police said.

Barnstable police narcotics unit detectives began a search for Galvin, going to addresses in Plymouth and Hyannis. Both suspects were located Wednesday at a house on Spring Street in Hyannis, police said.

Galvin attempted to flee but was found by police hiding in the attic with a knife. Both suspects were arrested and taken to Barnstable police headquarters.