Two men who tried to rob a Stony Brook dessert shop have been charged with several crimes after being nabbed with the help of an off-duty Nassau police officer who followed them from the store, Suffolk police said Tuesday.

Thomas Leahey, 28, of Ronkonkoma, and Joseph Salvia, 25, of Commack, were charged with three armed robberies and three attempted robberies, all within the past week, police said.

advertisement | advertise on newsday

The pair was arrested Sunday night after they tried to rob Cool Monkey Desserts on Nesconset Highway, police said.

An off-duty Nassau officer was entering the shop about 8:15 p.m. when employees told him the men had just tried to hold them up, police said. The officer trailed the suspects in his car and helped responding Suffolk officers capture them, police said.

After an investigation, detectives charged each man with three counts of first-degree robbery at Tropical Smoothie Café in Elwood Sunday; Subway in Hauppauge Wednesday; and Beach Bum Tanning in Commack on Jan. 28. Each was also charged with three counts of attempted robbery at Cool Monkey Desserts; Quiznos in Bohemia on Sunday; and Dunkin' Donuts in Smithtown on Saturday.

Leahey, of 461 Michigan Ave., and Salvia, of 10 Long Bow Lane, were scheduled to be arraigned Tuesday at First District Court in Central Islip. Arraignment details were not immediately available.