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: Roseville Taqueria Nixtaco Gains National Attention

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

READ MORE: Footage Released Of Carjacking Suspect's Assault On Sacramento Sheriff's Deputy

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: President Biden Releases Federal Funds To Aid Fire Hose Shortage In California

Madrigal is facing charges of impersonating a police officer.