Crime fell across Long Island in 2017, clocking historically low homicide totals even as police in Nassau and Suffolk attempted to deal with MS-13, the violent street gang officials blame for at least 14 slayings.

There were 22 homicides in Suffolk this year, down from 34 in 2016, and 15 homicides in Nassau, down from 23 — in both cases a decline of some 35 percent, the statistics show. Justin Meyers, assistant police commissioner in Suffolk, said the county’s homicide total is the lowest since 2002, when the department recorded 20 homicides.

Violent crime — which includes homicide, rape and robbery — is down this year 3.4 percent in Nassau as of Dec. 14 when there were 822 violent crimes reported versus the 851 during the same time period in 2016. The number of shooting victims in Nassau has dropped to 29 in 2017 from 52 in 2016, according to statistics.

In Suffolk, the violent-crime drop was 8.3 percent over last year through Dec. 16. The totals of all reported crimes have also dropped this year in both counties: down 7.1 percent over last year in Suffolk and 1 percent in Nassau.

Police officials attribute the crime decrease to an emphasis on data-driven and intelligence-led policing, analyzing statistics and identifying trends, collecting information and putting resources in areas where crimes are likely to occur. Police have also said they concentrated efforts on targeting gang members, seizing illegal firearms, building community relationships and collaborating with federal law enforcement.

Power of community policing

Acting Nassau Police Commissioner Patrick Ryder said community outreach has been “crucial” to cracking down on MS-13, which is thought to be responsible for eight killings in the county this year.

“What we do is data driven — identifying the problems, going into the environment and removing the problems and making the environment healthy again,” Ryder said. “And we do that through intelligence-led policing, through broken windows, through our field stops, through our community relationships.”

Get the Breaking News newsletter!

Outgoing Suffolk Police Commissioner Timothy Sini, who begins a four-year term as district attorney in January, also credited strong relationships with the community to helping combat crime increases, as well as drilling down on data and getting it to the officers quickly.

Both departments have made hundreds of arrests of people identified as either MS-13 gang members or their associates, which officials say has provided fruitful leads on crimes, officials said.

“We are every single day collecting intelligence and identifying people who are driving crime in our communities, whether they are drug dealers, gang members or some other type of criminal,” Sini said. “We are collecting that intelligence and disseminating that intelligence to the right people in the department, whether it’s patrol or detectives, so people are getting actionable intelligence in a much more efficient way than when I became commissioner.”

Authorities say eight of the 15 homicides in Nassau are believed to victims of MS-13 violence and six of the 22 in Suffolk, which has emerged as a hot spot of MS-13 activity on the East Coast. President Donald Trump and Attorney General Jeff Sessions both came to Suffolk County this year to offer support to local leaders in their fight to eradicate the gang.

Suffolk has made arrests in 15 of its homicides overall and in five of the six identified as MS-13 connected, Sini said.

Residential burglaries in Nassau are down 32.5 percent, a decrease Ryder attributes to the work by the department’s Burglary Pattern Team. “That used to be one of our biggest problems,” Ryder said of burglaries.

There were some increases among the statistics. In Nassau, felony assaults went from 361 in 2016 to 410 this year, and grand larcenies were up 4.7 percent, to 3,192 in 2017. Ryder said a majority of assaults are domestic incidents and larcenies are mostly attributed to drug use.

In Suffolk, every crime category is down. Residential burglaries are down 23 percent from 1,110 in 2016 to 855 in 2016, according to statistics.

In addition to MS-13, police cited the Island’s opioid epidemic as one of the region’s most vexing law-enforcement issues, but one that authorities are working to turn around.

Mirrors the national picture

The crime decreases in Nassau and Suffolk mirror what’s happening nationally this year. Crime in the country’s 30 largest cities is estimated to decline in 2017, according to a late December analysis by the Brennan Center for Justice at NYU School of Law, after rising in the prior two years.

The overall crime rate in the 30 big cities is projected to decline by 2.7 percent from 2016, according to the center, while the violent crime rate is predicted to decrease slightly, by 1.1 percent.

Some cities, including Baltimore, are expected to see an increase in homicides, according to the center. While the increase in Baltimore is 54 percent, the NYPD is projecting a historic homicide low.

Joseph Giacalone, an adjunct professor at John Jay College of Criminal Justice in Manhattan and a retired NYPD sergeant, said the nation’s recent strong economic performance was a driver of the crime decreases.

On generally affluent Long Island, police departments’ investment in technology and the ability to concentrate resources in historically crime-ridden areas has helped drive down the numbers, he said.

“In the age of computers and social media, investigators are finally catching up to the electronic street,” Giacalone said. “Cops are learning how to use it and it’s really starting to prevent crime.”

But, Giacalone said, police have to constantly remain vigilant with a gang as brutal as MS-13.

“Now both Nassau and Suffolk have to fight the perception that they’re gang-ridden,” Giacalone said. “It’s much tougher to fight the perception of crime than the actual crime when you’re finding bodies in areas where people are walking their dogs, and you find multiple homicide victims; people start going into panic mode.”

Both Sini and Ryder say they have invested heavily in community policing to help solve serious crimes.

“Probably the most important, our community relations,” Ryder said. “We go out and fix things that immediately need to be fixed and addressed and we show them that we do care. It’s that public-government trust — we have to have it.”

In the past two months, Ryder said, he has doubled the number of officers assigned to the department’s Community Oriented Police Enforcement unit, commonly known as COPE, where the message to officers, according to Ryder, is, “you’re not here to lock up people, you’re here to shake hands.”

Dialogue with the community gave Suffolk police crucial information that Sini credits with preventing the kidnapping of a Brentwood High School student by suspected MS-13 gang members and associates, according to court documents.

In early December, police got complaints from residents about a white van “harassing” Hispanic youths, and as a result flooded the area with undercover officers, who the next day thwarted the abduction attempt in real-time, holding the five suspects at gunpoint until backup arrived.

“We were able to be there because of our community engagement,” Sini said. “We’re making it incredibly uncomfortable to be an MS-13 gang member in Suffolk County.”

Correction: There were 822 violent crimes, which includes murder, rape, robbery and aggravated assault, in Nassau in 2017 through Dec.14 — a 3.4 percent decrease from the 851 in 2016.