Suffolk police said they arrested a Mastic man Tuesday in connection with the Oct. 26 robbery of a Shirley bank.

Detectives took John Barton, 31, into custody at about 11:15 a.m. Tuesday after an investigation by Pattern Crime Unit detectives that used witness statements and video surveillance to identify him, police said.

advertisement | advertise on newsday

Barton robbed the TD Bank at 530 William Floyd Pkwy. at 1:37 p.m. Oct. 26 by showing a teller a note demanding cash and threatening violence, police said. The teller complied and police said Barton then fled south on William Floyd Parkway.

He was charged with third-degree robbery and is being held overnight at the Seventh Precinct, police said. He is scheduled to be arraigned Wednesday at First District Court in Central Islip.