“At this point, all indications are that this was the work of MS-13,” said Timothy Sini, the Suffolk County police commissioner, at a news conference Friday in Bay Shore, N.Y. He was referring to the street gang La Mara Salvatrucha.

Last year, the gang was responsible for 11 deaths in Suffolk, including two teenage girls from Brentwood Ross High School, who were murdered with machetes and baseball bats, the police said.

Mr. Sini said that the brutal deaths of the four young men appeared consistent with the MS-13’s methods and that they were most likely killed by a sharp weapon. But he emphasized that the investigation was continuing.

“MS-13, part of their trademark, throughout the country and not just here, is to prey on recent immigrants,” Mr. Sini said. “That is because, many times, recent immigrant families are in vulnerable positions.”

He added: “It boils down to the notion that MS-13, they are individuals who prey on the vulnerable. They engage in acts of violence, they engage in acts of savagery, against those who can’t defend themselves as effectively as some others in our community.”