The man in the gray hooded sweatshirt rolled into a bank in Queens at midday on Monday, and handed the teller a note demanding cash.

“Give me all you have,” the note said, according to court papers. “I have a gun.”

The teller at the Santander Bank branch in Long Island City, Queens, complied, handing over $1,212, and then watched the man make his improbable getaway — in a wheelchair.

He pushed himself out of the bank and west on Broadway, his image captured on surveillance cameras in the bank and in stores along his escape route. After detectives disseminated his photo, the leads poured forth.

Police officials said on Friday that they had arrested Kelvin Dennison, 23, who provided the authorities with an address in Astoria, Queens, about two miles from the bank. He was a familiar figure in the neighborhood, the police said, a local panhandler with a brief arrest record for domestic episodes over the winter, including one on Valentine’s Day.