CENTRAL ISLIP, N.Y. — The attorney general of the United States, Jeff Sessions, came on Friday to this Long Island area besieged by the transnational gang known as MS-13, and in a 20-minute speech to local police commissioners and sheriffs vowed to eradicate the gang by cracking down on illegal immigration.

Mr. Sessions said the gang, which is linked to El Salvador, carries a threat similar to the Colombian cartels and the mafia. He said it smuggled gang members across the United States border and recruited young immigrants.

His message was familiar, and it bore the wishes of President Trump, who Mr. Sessions said was “particularly alert to” the violence affecting Suffolk County, where the bodies of four young men who had been brutally killed were found near a park on April 13.

The authorities contend the killings had the markings of MS-13, which would bring the gang’s body count to 15 in Suffolk County since the beginning of 2016, the most violent stretch since MS-13 took hold on Long Island in the late 1990s.