Police said Chris Nilsen, 52, of Hoffman Lane, walked into the TD Bank branch on Middle Country Road at 3:08 p.m., demanded cash from a teller, got it and fled.
But another driver saw Nilsen fleeing and got his license plate number, police said.
The information about the getaway car was broadcast, police said, and a short time later, Dwyer saw the car in the lot at the Islandia 7-Eleven.
Police said Nilsen drove the car through some bushes in an attempt to escape, then ran over a curb and onto the road -- but was stopped at Hawthorne Avenue near Half Mile Road in Central Islip following a brief pursuit. Nilsen then ran, but was later caught by Dwyer and Sgt. Eric D'Agostino, police said.
Nilsen was charged with third-degree robbery. He is scheduled for arraignment Tuesday in First District Court in Central Islip.