SANTA CRUZ, Calif. -

A 37-year-old man has pleaded guilty to robbery and burglary charges stemming from incidents that occurred at a Watsonville hotel earlier this year.

Armando Farfan pleaded guilty to one count of first-degree residential burglary and two counts of robbery. He was sentenced to 13 years in state prison.

On Jan. 20, Farfan went to the Watsonville Days Inn at 3 a.m. in search of an individual and instead encountered an open door to an occupied hotel room. He entered the room and tried to steal the occupant's computer and purse, but she woke up and told him to leave. He told her he was with hotel security and left.

Police were called and took a report.

At 4 a.m. that same day, Farfan returned to the hotel and told the front desk attendant that if he called the police again, he would kill him and his family. Farfan then robbed the front desk attendant of his wallet and computer.

An hour later, Farfan returned and demanded all of the money from the register. He threatened to shoot the attendant if he didn't hand over the money.

Police used surveillance footage from the hotel to identify the suspect as Farfan and arrested him two days later at a different hotel in Watsonville.