A waitress who stopped to deposit her tips in an ATM in South Portland early Thursday morning wound up saving her bank more than $37,000 – minus the $100 she got back as a reward.

The woman called police to report a suspicious man at TD Bank’s ATM on Maine Mall Road. What she didn’t know at the time was that the machine had malfunctioned and was spitting out cash as fast as the man could ask for it.

Officers arrived around 5:30 a.m. and found him stuffing thousands of dollars from the machine into a plastic shopping bag, said South Portland police Lt. Todd Bernard.

Bernard refused to identify the man Friday because he had not been charged with a crime and the investigation had not been completed. TD Bank spokesman Eric Springer said all of the money was recovered and the bank is not pressing charges against the man.

Police had encountered the same man sleeping near the ATM at the bank around 1 a.m. Thursday and asked him to leave, Bernard said.

The man arrived in Maine from Utah this winter, Bernard said, and South Portland police have encountered him several times after receiving calls from businesses about a suspicious person. Police had found him sleeping in the same bank lobby about a week earlier, Bernard said.

Because the man is transient, Bernard said, it could have been difficult to find him if he hadn’t been caught while still making his withdrawals from the ATM.

Several hours after being asked to leave the bank Thursday morning, the man returned to the ATM and withdrew $140 from his account. He then requested a cash advance of $760 and got it, even though he didn’t have money in the bank to cover it, said Bernard.

He continued pushing the button for cash advances and continued collecting money because of a software coding error that has since been corrected, said Springer, the bank spokesman. The machine was fixed and running by late Thursday afternoon.

Asked how often such an error happens, Springer said it was “an isolated occurrence.”

Doug Johnson, vice president of risk management policy for the American Bankers Association, called the incident “highly unusual.”

He said he probably hears of an ATM accidentally dispensing too much money less than once a year, and has never heard of so much cash coming from one machine.

“We see folks that try to just take the money and others that will go and give it right to the bank,” he said. “Depending on the circumstances, the bank will decide to press charges or not.”

Meanwhile, both TD Bank and South Portland police said they plan to recognize the woman who made the report.

Police would not identify her and, when contacted Friday by the Portland Press Herald, she asked not to have her name in the newspaper, for fear of retaliation from the man who tried to take the money.

The woman said she was simply planning to make a cash deposit before work at a local diner. When she drove up to the bank around 5 a.m., she saw the man standing at the ATM in a black hooded jacket, and decided to leave and come back.

After getting coffee, she returned 20 minutes later. He was still there, she said. That’s when she called police.

Officers responded and watched the man make several transactions at the ATM before they approached him and discovered the bag of cash. They then talked to the bank’s staff, took the money and let the man go, Bernard said.

The waitress found out on Facebook what had happened after she left. Later, an officer called to tell her that the bank wanted to give her a reward.

Although the $100 prize pales in comparison to what the bank could have lost, she said, she looks at it as getting something “for doing nothing.”

Leslie Bridgers can be contacted at 791-6364 or at:

lbridgers@pressherald.com

Twitter: @lesliebridgers