Customers at a Patchogue ice cream parlor did more than get some sweet respite from the heat Friday night. They helped foil a robbery.

Suffolk County police said an unarmed man entered the Carvel Ice Cream store on East Main Street shortly before 8 p.m. and grabbed cash from the register.

advertisement | advertise on newsday

As the suspect, Glen Gregor, 47, of Patchogue, attempted to flee, customers called police and tried to corral him, holding the door closed from the outside, authorities said.

Gregor kicked out a window and fled on foot, but he was arrested a short time later by a patrol officer from Suffolk's Fifth Precinct.

Gregor was taken to Brookhaven Memorial Hospital Medical Center, where he was treated for injuries from broken glass. No other injuries were reported.

Charged with third-degree robbery, Gregor was to be arraigned Saturday in First District Court in Central Islip.