President Trump’s pledge to wipe out the notoriously violent MS-13 gang is gaining traction — at least in the Empire State.

Federal officials have rounded up close to 40 accused members of MS-13 in New York City and Long Island in the 30 days following vows by Trump and Attorney General Jeff Sessions to crack down on the gang, known for terrorizing immigrant communities.

Of the 45 N​ew ​Y​ork​-area gang arrests over the last month by US Immigration and Customs Enforcement and Homeland Security, 39 were affiliated with MS-13, which has been blamed for a string of recent murders in normally placid Long Island, the feds said.

Those who are not charged with crimes will be processed for deportation, the feds said.

Authorities announced the arrests Wednesday as part of a newly formed task force aimed at MS-13 in New York City and Long Island.

The task force — dubbed “Operation Matador” — was put together in May following a high-profile visit by Sessions to Long Island to address MS-13’s growing presence in the suburbs.

MS-13 members are known for tattooing their bodies in devil horns — a trend that is helping law enforcement properly ID them for arrest and deportation.

Twelve of the reputed MS-13 gang members arrested over the past 30 days crossed the border as unaccompanied minors, the feds said. Now, all are considered illegal immigrants.

Three of those rounded up recently had Special Immigrant Juvenile Status, an immigration classification available to certain undocumented minors who have been abused, neglected or abandoned by their parents, the feds said.

MS-13, known for drug trafficking, kidnapping, human smuggling, murder and sex trafficking, was labeled a “transnational criminal organization” by the Treasury Department in 2012.

But Sessions, who has called MS-13 “one of the most violent gangs in the history of our country,” has suggested it could be labeled a terrorist organization under the Trump administration.

Like the Italian Mafia, MS-13 follows a strict code of conduct, including beating — in increments of 13 seconds — members who break the rules and a “green light” to kill any government cooperators.