A Selden man who police said robbed a Walmart in Centereach on Wednesday has also been charged with a burglary that took place earlier this month, Suffolk County police said.

Police said Sean Patti, 30, entered the Walmart at the Centereach Mall about 3:50 p.m. and attempted to buy a drink at the register. He passed a note to the clerk indicating he had a gun and demanding cash, police said.

advertisement | advertise on newsday

Patti then fled, and was found by police officers shortly after inside the Middle Country Library at 575 Middle Country Rd. in Selden.

Police said a further investigation revealed that Patti was responsible for burglarizing the AT&T store at 387 Independence Plaza in Selden on Oct. 15.

Patti was charged with third-degree robbery in the Walmart robbery and third-degree burglary in the Selden case, police said. He is scheduled to be arraigned on Thursday at First District Court in Central Islip.