PATCHOGUE - Customers seeking to cool off with some ice cream managed to help thwart a robbery in progress last night in Patchogue.

Police say 47-year-old Glen Gregor walked into the Carvel on East Main Street at around 8 p.m. and stole money from the register. Owner John Lin, who was at the shop with his niece, says Gregor went to flee, but a customer held the door closed. Police say Gregor then punched out a window and fled on foot.

Lin says that he and another customer went after Gregor, but lost him after he scaled a 6-foot fence.

Police caught up to Gregor a few blocks away and arrested him. He was taken to a hospital, treated for his injuries and is now facing third-degree robbery charges.