John C. Campbell, 35, told police he stole the drugs to feed his opiate addiction. He said he was unemployed and didn’t have access to health care.

“This is an individual with a very serious addiction,” Martin said.

Campbell fled the city soon after the robberies by boarding a Greyhound bus to New York, Martin said. Brewer police Detective Fred Luce learned Sunday that Campbell had purchased a ticket to travel back to Bangor on the bus.

“Evidence was recovered related to the pharmacy robberies,” Martin said, but he couldn’t say what the evidence was because the district attorney’s office hasn’t been informed.

Campbell had been charged in connection with a Sept. 30 attempted robbery at the Rite Aid on Wilson Street in Brewer and the robbery of the Hannaford grocery store pharmacy on Union Street in Bangor that happened a little more than an hour later.

Brewer Public Safety Director Perry Antone said Wednesday that Campbell fled the Brewer drugstore empty-handed. Antone was not sure if Campbell made off with any prescription drugs during the Hannaford heist.

Antone said state police Trooper Barry Merserve and his tracking dog, Zorro, were brought to Brewer just after the robbery there and were able to determine the alleged robber’s last direction of travel.

That, he said, turned out to be important later, when police learned that the suspect had lived in the area where the track ended on Sargent Drive, a short side street that runs off Eastern Avenue, a short distance away from Rite Aid.

Antone said information and evidence that detectives collected at the Brewer crime scene enabled police to link that robbery to the one at Hannaford.

Antone said the felony theft charge stems from his taking a 2010 Toyota Scion from its owner under “circumstances that weren’t exactly what he portrayed them to be.”

The Scion was recovered undamaged Tuesday in New Jersey, where Campbell was pulled over for driving with a suspended license, arrested and then allowed to make bail, Antone said. He said arrangements are being made to return the vehicle to its owner.

The recovery of the alleged getaway car “led us to some of the information we had in the affidavit that led to the arrest warrant,” Antone said.