A Los Angeles County Superior Court judge on Monday granted a petition sought by the union that represents county prosecutors that will bar Dist. Atty. George Gascón from implementing policies that would end the use of sentencing enhancements in thousands of criminal cases.

The union sued Gascón in late December, alleging some of his policies restricting the use of sentencing enhancements violated state law and put line prosecutors in an ethical bind, KTLA reports.

In his ruling, Judge James Chalfant blocked Gascón from ordering prosecutors to dismiss sentencing enhancements for prior strike offenses in active cases. Chalfant described Gascón’s policy as “unlawful” in his 46-page ruling.