TURLOCK (CBS13) — A man is in custody accused of impersonating an officer to get into a motel room.

The Stanislaus County Sheriff’s Office says Alejandro Madrigal, 35, went to a motel on North Golden State Boulevard in Turlock. He reportedly showed a gold-colored badge to a housekeeper, saying he was an undercover cop and needed to be let into a room.

READ MORE: Family’s Car Riddled With Bullets As They Drive Away From Tracy’s West Valley Mall

The housekeeper then notified the front desk, who called deputies to the motel.

READ MORE: Sacramento Renews Interest In Zoo Relocation Sites

When deputies arrived at the motel Madrigal was gone, but he was located just before 11 p.m. Wednesday in the parking lot of a nearby restaurant.

MORE NEWS: Thieves Hit UC Davis, Rite Aid, CVS, Safeway Over Weekend

Madrigal is facing charges of impersonating a police officer.