A homeless man was charged with robbing a bank last week in northwest suburban Hoffman Estates.

At 12:27 p.m. Tuesday, 24-year-old Justin Hernandez walked up to a teller at the Chase Bank branch at 2555 W. Golf Road and placed a threatening note on the counter demanding money, according to a federal complaint filed in U.S. District Court’s Northern District of Illinois.

“3,000 or I shoot you,” the note read, according to the FBI. “Then shoot myself.”

The teller handed over $1,230 in cash, and Hernandez took off, the FBI said.

A surveillance camera at the branch was able to capture images of Hernandez, the FBI said. After releasing the surveillance photos, the FBI announced that Hernandez was also suspected of a December robbery at a Chase branch in west suburban Addison.

Later Tuesday, Hernandez’s former roommate identified him as the robber, the FBI said. The former roommate reported that Hernandez had owed $2,000 in outstanding rent payments.

Hernandez called the roommate shortly after the robbery and asked to be picked up from a Subway restaurant in Hoffman Estates, the FBI said. When the former roommate picked him up, Hernandez handed over $1,000 in cash.

On Wednesday, the former roommate informed the FBI that Hernandez was at a train station in northwest suburban Schaumburg. Agents found Hernandez unconscious at the station, and he was taken to a hospital, the FBI said. He was wearing clothing that matched the description of the robber.

After being released from the hospital, Hernandez admitted to robbing the Chase branch, the FBI said.

Hernandez was charged with a single count of bank robbery by force or violence, according to a federal court filing. He is being held without bond awaiting a Thursday court date after waiving his initial detention hearing.