UNION CITY (CBS SF) — Police arrested a 22-year-old man Wednesday morning after he allegedly tried to rob a Union City pharmacy and take an assortment of prescription pain medication.

Around 10 a.m., a man walked into the Rite Aid at the Marketplace shopping center located at 1650 Decoto Road, according to police.

READ MORE: Video: Violent Carjacking From Richmond Auto Dealership; Worker Hurled From Hood Attempting To Stop Thief

The man then presented a note to the clerk at the store’s pharmacy, demanding prescription pain medication. The man threatened to hurt the clerk if they didn’t comply, police said.

The clerk however notified the pharmacy and the store manager.

The suspect then fled the store without taking any medication.

READ MORE: VIDEO: Asian Man Attacked In Oakland, Tries to Fight Back In Attempted Robbery

He was seen fleeing on foot with two other women, according to police.

After calling police, the employees were able to provide responding officers with a description of the suspect. Officers searched the area and located a man matching the description given by employees.

The man was leaving the laundry room of a gated apartment complex nearby, accompanied by two women. Officers recovered the man’s shirt inside a garbage can in the laundry room, police said.

The suspect was identified as Luis Pantoja. Pantoja was arrested on suspicion of attempted robbery, making criminal threats and possession of a controlled substance, according to police.

MORE NEWS: 'Absolutely Shocked': California Teen Accepted To 5 Ivy League Schools And Stanford

© Copyright 2016 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.