BAKERSFIELD, Calif. (KGET) — The Kern County Sheriff’s Office arrested a man for armed robbery on Thursday after he stole morphine and money from a pharmacy in Oildale, according to a tweet by KCSO.

Deputies were dispatched to the Rite Aid on China Grade Loop for an armed robbery just after 5 p.m. The man approached the pharmacy counter with a handgun in his waistband and demanded the employees give him morphine. After he threatened to shoot them, they complied and gave him the medication, KCSO said.

The sheriff’s office said he also stole money from the register before leaving the store.

A customer in the store saw the man leave in a taxi, according to KCSO. The witness followed the cab and led deputies to a nearby bus bench where the suspect was dropped off.

Deputies arrested the man without incident and recovered the stolen money.

The gun he was carrying turned out to be a BB gun.