A bank worker in China discovered a loophole with ATM withdrawals that allowed him to take out more than $1 million in "free money" from cash machines over the course of several months.
Qin Qisheng, who worked for the Huaxia Bank in Beijing, realised that cash withdrawn at around midnight did not register in the bank's system.
After discovering the ATM trick, Qin reportedly added a script to the bank's software so that no alerts would be triggered by suspicious activity.
He then used a test account to make withdrawals in amounts ranging from 5,000 yuan to 20,000 yuan.
His illicit transactions were eventually noticed after 14 months, by which point he had withdrawn more than 7 million yuan (£800,000).
Huaxia Bank accepted Qin's explanation that he was making the withdrawals to test the system, according to the South China Morning Post, despite the money being moved to his personal account.
An internal investigation also revealed that some of the money was even used to invest in the stock market.
The matter was reported to the police but the bank requested that the case be dropped after Qin returned the money. Authorities did not accept the bank's explanation and the case was brought to trial.
"Qin Qisheng said that the matter was complicated and involved lots of work," a representative for Huaxia Bank reportedly told the trial.
"He believed the bank would not pay attention even if he reported it... We think this reason for not reporting is legitimate."
In his defence, Qin added: "The customer generally would not report to the bank, [so] we were not informed about this situation. The problem was definitely there, the bank just couldn’t find the reason."
Qin was sentenced to 10 and a half years in prison and handed a fine of 11,000 yuan.
“On the one hand, [the bank] said that the accused’s behaviour was in violation of the rules," the sentencing judge said.
"On the other hand he said that he could conduct relevant tests. This is self-contradictory."
The bank told the court that the loophole has now been fixed.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies