More than three dozen gang members have been arrested and now face deportation following a month-long operation in New York City and Long Island, law enforcement officials announced Wednesday.

Of the 45 men who were arrested, officials said 39 are known members or affiliates of the MS-13 street gang. Members or affiliates of the Sureños, 18th Street Gang, Latin Kings, Los Niños Malos and Patria gangs were also nabbed. Three of them were arrested in Queens, one was arrested in Brooklyn and 41 were arrested in Nassau and Suffolk counties.

Twenty of the gang members have criminal histories, according to officials, including convictions for assault.

The arrests were part of “Operation Matador,” a joint initiative between local and federal law enforcement agencies, including the NYPD, ICE Enforcement and Removal Operations and Homeland Security Investigations.

“These individuals are members of a violent street gang actively wreaking havoc in the community. This unified effort is about keeping New York citizens safe,” said Thomas R. Decker, field office director for ERO New York.

All of the gang members are foreign nationals from El Salvador, Honduras, Mexico and Guatemala, according to ICE, 12 of which crossed the border into the United States as unaccompanied minors and three entered the country with special immigrant juvenile status.

Some of the arrestees are expected to be charged with re-entering the country after already being deported, a felony charge, officials said. All of the gang members will be processed for deportation, according to ICE.