In Riverhead, Riverside and Flanders, gang violence has long been an issue. Town, police and community leaders say they are working together in an attempt to attack the root of the problem.

In Southold Town, gangs are more prevalent than in the past, as changing demographics have brought Latin groups like MS-13 and 18th Street to the East End.

Sgt. Steven Lundquist, an investigator with the Gang Intelligence Unit of the Suffolk County Sheriff’s Office, said the county’s most prevalent gang is the Bloods, though other national gangs — including the two involved in last week’s shooting, as well as the Crips and the Latin Kings — are also active across the area.

Gang members have tried to “fly under the radar” in Suffolk County in recent years, Sgt. Lundquist said. Law enforcement is seeing fewer gang members wearing their traditional colors or getting associated tattoos.

Police have also found that gang members known to live in Nassau or New York City have turned up across Suffolk County, Sgt. Lundquist said. He believes those gang members are traveling east to avoid a larger police presence.

Last week’s incident was an escalation of the gang activity typically reported in Southold Town, where shootings are rare, said police chief Martin Flatley.

“None of [the recent violence] has been as blatant as this,” he said.

Chief Flatley said police suspect that some assaults involving different “factions” of Hispanic men may be gang-related, but added that it’s often difficult to prove, since some members of the Hispanic community often do not trust police. He said the root of that problem with trusting cops lies in Central America, where police corruption is rampant and gangs are said to control many parts of the region.

The last major gang-related incident in Southold Town took place in 2009, when a 15-year-old Eber Lopez of Greenport went missing from a christening celebration in Southold, Chief Flatley said. At the time, neighbors said they heard three gunshots just before midnight and police found blood in the backyard, according to a previous Suffolk Times article.

Homicide investigators said that Eber — who was not affiliated with a gang — had been confronted by known gang members at the celebration.

The teen’s body was discovered in Farmingville the following month. A Southold man was later convicted of aiding another man who murdered the boy, though the killer was never caught.

Chief Flatley said crimes like the murder of Eber Lopez or the shooting early last Tuesday are rare. He told The Suffolk Times that police have noticed more activity with Hispanic gangs in the area, likely because of the rising immigrant population.

“It’s almost inevitable,” he said. “A lot of the families are from El Salvador. We obviously do know how a lot of the culture is in El Salvador and when they move to our area they’re moving with a part of their culture.”

The Southold chief said his officers take training courses on how to identify gang members and have worked with other police departments to build a database of possible gang members in the area.

The Federal Bureau of Investigation has also taken note of the most recent incident on the North Fork, said Richard Frankel, special agent in charge of the FBI’s Criminal Division in New York.

“The FBI places a high priority on policing and curtailing gang violence on Long Island,” he said in an email. “Our MS-13 investigative team is aware of last week’s shooting incident and is assisting the Southold Police Department.”

Other departments on the East End are also planning to beef up their enforcement to combat gangs.

Southampton Town Supervisor Anna Throne-Holst said in an interview that the town’s preliminary budget includes funding for three additional police officers; a fourth officer may also be added and the department will receive updated computer systems, she said.

Ms. Throne-Holst lauded the East End Drug Task Force, which she said effectively targets many gang drug operations. Local law enforcement said more collaboration between departments over the past few years has helped combat gang violence.

“The East End Drug Task force is very focused on gangs and gang activity,” said Ms. Throne-Holst. Southampton police had not participated in the task force until 2011, after longtime Police Chief James Overton retired.

“There is no question about it that there’s a very strong nexus there … I think the task force and participation in [it] is crucial,” Ms. Throne-Holst said.

While Southold has reportedly seen an uptick in MS-13 activity, Riverhead Town Police Chief David Hegermiller said “aggressive” steps to curb gang activity have held several gangs’ growth at bay in Riverhead.

Chief Hegermiller said most gang activity in town is related to pockets of neighborhoods that have “affiliated themselves with national gangs.” Members of the department’s Community Oriented Police Enforcement Unit keep a log of incidents that may be gang related, he said.

Chief Hegermiller said regular meetings of the East End police chiefs and their detectives have also helped law enforcement identify potential gang members.

“We’re doing that much better than we were doing it in the past,” he said.

But one of the biggest factors in helping to combat gangs has been outreach efforts in the community, he said.

The department has held seminars for other police agencies and community members to educate residents about the dangers of gangs, something Chief Hegermiller credits as having a positive impact.

The department’s COPE unit is active in Riverhead School District’s Council For Unity, an anti-gang program designed to foster friendships and reduce violence in schools.

Riverhead Police Detective Evelyn Hobson and Jill Porter from the county probation department also visit students in middle school to warn them about gangs.

Robert De Sena, who founded Council for Unity in 1975, said increased law enforcement isn’t enough to eliminate gang activity because it doesn’t treat the cause.

“You can’t arrest your way out of this,” he said. “This is a very complex problem and simplistic approaches aren’t going to solve it.”

Instead, community members have to support at-risk children who lack strong family bonds or social structures. Mr. De Sena said Riverhead has served as a model for other communities struggling with the cycle of gang violence.

At Tuesday night’s Greenport school board meeting, several concerned parents asked what the district was doing to protect students and prevent gang activity inside the schools after it was discovered that one of the MS-13 members involved in last week’s shooting was a student at the high school and was arrested on its grounds.

Superintendent David Gamberg said the district was looking into training teachers to recognize possible gang activity and would do a better job of making sure doors allowing access into the building are secured.

He told The Suffolk Times that the district’s biggest asset was the close relationships between students and the teachers who can mentor them, adding that the district could look for guidance to districts farther west — like Riverhead — that have dealt with this issue.

“We can learn from other places, I think,” he said.

But Chief Hegermiller said there are still things that can be done beyond what Riverhead has accomplished. Though Council for Unity works with inmates in jail and while there is a post-release program in town to help reduce recidivism, the police chief said he’d like to see more mentoring programs for youth who can’t be reached through the schools.

Mr. De Sena agreed, adding that an entire community must come together in order to curb gang violence.

“Neither law enforcement nor education has the resources to go into the community to replace that,” Mr. De Sena said. “You need to replace the sinister culture with a culture of hope.”