A man attempting an armed robbery at a thrift shop in Centereach Saturday night got something he probably hadn’t bargained for.

Workers at the store ended up wrestling the man to the floor, taking his gun away and holding him for police, according to authorities.

Ronald J. Kelly, 45, of Holtsville, walked into Island Thrift on Route 25 in Centereach about 8:30 p.m., pointed a shotgun at the manager and five other employees at the store, and demanded money, Suffolk County police said in a news release.

The manager, whom police identified as a woman, “feared the situation was becoming dire and grabbed the gun.”

Two employees joined the struggle, gained control of the shotgun and wrestled Kelly to the floor, holding him until Sixth Precinct units arrived and took him into custody, police said.

Kelly was taken to Stony Brook University Hospital for treatment of non-life-threatening injuries suffered during the altercation, police said.

advertisement | advertise on newsday

He is charged with robbery and criminal possession of a controlled substance, and held on bail of $500,000 bond or $250,000 cash at arraignment Sunday at First District Court in Central Islip.

On Sunday, customers talked about the heroics of the staff.

“To try to take a gun away from somebody is pretty dangerous,” said Daniel Clarke, 65, of Sound Beach and a retired Suffolk County Court officer. “You’re risking your own life. It is terrific they subdued him.”

“It’s heroic of the staff but I just don’t recommend people do that unless you have no other options,” Clarke said.

Julie Stern, of Farmingville, said, “They kept their employees and their customers safe, and that’s always a good thing.”

A manager at the thrift shop declined to comment on the incident Sunday.