A first-in-the-nation law passed this year in New York to curb the opioid epidemic by imposing a surcharge on opioid manufacturers and distributors based on the amount of product they sell in the state has been struck down as unconstitutional by a federal judge in Manhattan.

U.S. District Judge Katherine Polk Failla of the Southern District of New York said in a decision Wednesday that a section of the law intended to prevent opioid companies from passing the cost of the surcharge onto its customers violated a section of the U.S. Constitution.