One unlucky bank robber suspect in Illinois is probably regretting his recent decision to purchase a lottery ticket after he dropped it in the midst of a heist, leading to his arrest. Local law enforcement authorities subsequently used it to identify and locate him. Dexter L. Riley, 38, has been charged with robbery by FBI agents who used his scratch-off ticket to identify him after his September 28 robbery of a Chase bank in Chicago.

Riley first allegedly entered the Chase Bank branch that he is accused of subsequently robbing, early in the morning on September 28, according to footage from the scene of the crime.

By motioning with his left hand he had tucked away inside of his dark sweatshirt, he led the bank teller to believe he was armed with a concealed firearm and subsequently passed her a bag and note telling her to “put all the money in the bag and we won't have any problems,” according to a report by the Chicago Tribune.

Robber almost got away with it

Moments later, Riley was giddily strolling out of the financial institution with some $8,200 in stolen cash, blissfully unaware of the fact that he hit a stroke of misfortune by dropping his scratch cards as he left. After reviewing footage of the incident, investigators picked up on the fact that a small scrap of paper appeared to slip out of one of his pockets.

They chased it down to discover it was a simple scratch-off lottery ticket not unlike millions of others sold each year across the country.

Investors found that the ticket had been purchased at a Rolling Meadows gas station just the previous night, per Patch, and they checked the station’s security footage. They found a man matching Riley’s description purchasing the ticket in the footage before driving away in a Chrysler Pacifica.

Discuss this news on Eunomia

The minivan was apparently later noticed by two police officers, who then pulled Riley over and arrested him without incident.

Caught by security footage

Riley admitted to being the individual in the bank’s security footage after a manager identified him as the person who had robbed them. He confessed to using some of the money he stole from the bank to purchase his minivan, drugs, and a video game system.

He also used some of the cash to pay rent.

Every year in the United States, billions of dollars are shelled out for lottery tickets, with CNN claiming that Americans spent $80 billion on lottery tickets and electric lottery games in 2016 alone.