The contractor, whose name has not been released so far, became stuck on Wednesday afternoon. The man was changing a lock to a Bank of America room that leads to the back of the ATM, Corpus Christi Police Lt. Chris Hooper told The Associated Press.
But afterwards he couldn't let himself out of the room because he didn't have a keycard on him and was unable to notify bank employees for help.
"Apparently he left his cellphone and the swipe card he needed to get out of the room outside in his truck," Hooper said.
When the man realized customers were retrieving cash from the machine, he started passing "help me" notes to them through the ATM receipt slot. One of the notes read, "Please help. I'm stuck in here and I don't have my phone. Please call my boss."
Understandably, some customers appeared to dismiss the notes as a prank, Hooper said. But someone took the notes seriously and called the police, who detected a faint voice coming from inside the ATM.
"We come out here, and sure enough we can hear a little voice coming from the machine. So we are thinking this is a joke. It's got to be a joke," Richard Olden, a Corpus Christi Police senior officer, told KRIS-TV.
A police officer kicked in the door to the room and freed the man.
"We have a once in a lifetime situation that you will probably never see or hear again," Olden said.
He added, "Everyone is okay, but you will never see this in your life, that somebody was stuck in the ATM. It was just crazy."