The New Jersey Supreme Court on Monday abandoned its quarter-century-old rule that a judge in a criminal case must dismiss an entire panel of jurors if one side or the other uses race as a factor in peremptory challenges.

In a unanimous decision, State v. Andrews, the court said judges should be given the flexibility to craft a remedy based on the circumstances at hand.