A Boston federal judge on Tuesday struck down a Massachusetts ban on the painkiller Zohydro ER because the U.S. Food and Drug Administration’s approval of the drug trumped the state’s authority.

U.S. District Judge Rya Zobel granted Zogenix Inc.’s preliminary injunction against enforcement of the ban. Zobel’s order takes effect on April 22.