AUGUSTA — Robbing a Waterville bank was a spur-of-the-moment decision for David R. Alvarez, according to police, one part of a string of bad luck and flawed decisions Friday morning.

Newly released court records say the robbery demand note, written on a piece of paper torn from a paper bag that Alvarez found in his pickup, briefly confused the teller at Bangor Savings Bank at 366 Main St.: “Don’t do shit or I remove pistal and short 10.000.”

The hoodie-wearing robber didn’t bring a bag to carry off the loot, and the teller didn’t have a bag either. So the robber told her to use her jacket, which was on the back of the chair.

The robber left with the jacket wrapped around $3,715 in cash.

A couple hours later, Alvarez, 28, of Thomaston, was asking a detective, “How did you know it was me?”

He’d been identified, police said, because before the robbery he’d backed his pickup truck into a pole Friday morning and the officer who investigated the car accident recognized Alverez on the bank surveillance tape.

The details of the events in the hours before and after Friday’s robbery are spelled out in an affidavit by Waterville Police Officer David Caron, which is filed in Kennebec County Superior Court. Alavarez was held in Kennebec County jail in lieu of $10,000 bail over the weekend and appeared before a judge Monday via video link from the jail.

Alvarez told police he and his girlfriend had both been laid off since the start of winter, had no money and were using food stamps. He said she kicked him out of their Thomaston home, so he drove to Waterville. On Friday, he went to get an estimate for work on his pickup, but at about 8 a.m. he backed into a pole at the Texaco Xpress Lube at 87 Armory Road.

Waterville Police Officer Damon Lefferts investigated the accident.

Alvarez said that as he drove around afterward, he “decided that he wanted to take some money back to his girlfriend to help out the situation they were in,” Caron wrote in the affidavit.

After Alvarez fled the bank on foot, he said he drove his pickup to a friend’s. He then walked around and threw the teller’s jacket and his gloves in the trash.

He offered a stranger $10 for a ride to U-Haul, and police ultimately found him in the back of her SUV.

He told police he didn’t have time to spend any of the stolen money, saying they “got to him so quickly that he hadn’t even had the chance to buy some cigarettes,” according to Caron.

Alvarez told police that before he robbed the bank, he had about $20 in cash on him.

Police recovered $3,260 of the stolen money but $445 was missing, according to Caron’s affidavit.

Lefferts, viewing the bank’s surveillance video, identified distinctive black gloves with the U.S. Cellular logo that Alvarez had worn earlier that morning. A Maine Drug Enforcement Agency officer also identified Alvarez from the surveillance video, as did the teller.

The teller told police she had a hard time understanding the robbery note, but once she saw the word “pistal” and the number 10, “she realized the man was robbing the bank.”

Alvarez told police he didn’t remember specifically what he put in the robbery note, but thought he’d asked for $10,000.

He is charged with a class B robbery offense, which carries a maximum sentence of 10 years in prison, and a misdemeanor theft charge.

Bail on those charges was set at $20,000 cash and included a ban on use or possession of drugs and alcohol, a no-contact provision with the teller and an 8 p.m.-6 a.m. curfew. Alvarez is also being held without bail on a charge of violating probation.

Betty Adams — 621-5631badams@centralmaine.comTwitter: @betadams