MASTIC, N.Y. (CBSNewYork) — Drug charges were dismissed against three people after the Suffolk County DA’s office said the substance in their possession was not illegal.

The men were arrested in Mastic and charged with possessing 725 grams of fentanyl — over 1-million doses.

READ MORE: Wet And Windy Conditions Prompt Coastal Flood Warning On Long Island

The Suffolk County DA’s office said the substance was not fentanyl and the case was dismissed, and the trio released.

READ MORE: New York Weather: CBS2’s 1/17 Monday Morning Forecast

Assistant Police Commissioner Justin Meyers told WCBS 880’s Sophia Hall the substance was an analog of fentanyl with only a molecule difference. He said the substance is still very dangerous and deadly, and the DA’s office knew about the type of fentanyl and encouraged the department to make the arrests.

“The district attorney who was just federally indicted made the decision to dismiss this case yesterday,” he said. “Why they would do that is beyond me.”

MORE NEWS: New Yorkers Urged To Stay Off Roads As Wintry Mix Moves Through Region

The DA’s spokesperson said lab work showed what was seized was not a controlled substance, so the charges had to be dismissed.