A Setauket man was arrested in connection with a burglary at a Sayville home after he was surprised by the homeowner, then was spotted walking in the neighborhood by a resident who detained him for officers, Suffolk County police said.

Brian Cook, 45, allegedly broke into a home on Barnsley Lane about 6 p.m. Thursday, stealing jewelry and gift cards before he was discovered by the female homeowner when she returned to the house, police said.

Cook fled, and the woman called 911, police said.

DataLI crime stats

"A short time later, a local resident spotted a man who fit the description of someone who had recently burglarized a home in the area," police said in a news release. That resident managed to detain Cook, police said, until officers arrived.

Police said Cook also was involved in burglaries last month of two Bayport businesses: the Shaolin Self Defense Center and Zone Z Fitness, both on Montauk Highway.

A police spokesman said on Sept. 20 Cook possessed keys, money and other belongings from those burglaries.

advertisement | advertise on newsday

Cook was arrested Thursday by Suffolk police Fifth Squad detectives about 8:40 p.m. He was charged with second-degree burglary, third-degree criminal trespass and two counts of fifth-degree criminal possession of stolen property in connection with the burglaries of the home and the businesses.

He was scheduled for arraignment Friday in First District Court in Central Islip.

With Jennifer Barrios