Two men were arrested on charges of burglarizing a gas station in Stony Brook early Thursday, Suffolk County police said.

A security firm alerted police that a burglar alarm had been activated about 3:55 a.m. at the Munch Repair Service/Getty Gas Station at 999 North Country Rd.

advertisement | advertise on newsday

Responding officers from the Sixth Precinct saw two men leaving the gas station and chased them on foot, police said.

They caught up with and arrested Daniel Maillard, 18, of 14 Highwood Rd., Setauket, and Austin Kennedy, 18, of 20 Whitford Rd., Stony Brook, police said.

They were being held pending arraignment Friday in First District Court in Central Islip on charges of third-degree burglary, police said.

The proceeds of the burglary, mostly tobacco products, were recovered, police said.