A man trapped in an ATM was rescued Wednesday after slipping notes begging for help through the receipt slot, according to authorities.

The man was a contractor who was working on the machine when he accidentally locked himself inside, according to Corpus Christi police officer Gena Pena.

Police arrived to the 400 block of North Mesquite Street about 2:05 p.m. after a passerby saw a note the man slipped in the receipt slot asking for someone to help him. The note also said he didn't have a cellphone with him. Police said some people thought it was a joke.

Pena said no one could hear the contractor in the ATM and said several officers had to kick the door in to rescue him.

It is unknown how long the man was in the ATM, Pena said, but officers left the scene about 2:30 p.m.