Prosecutors who let otherwise prison-bound defendants into the state’s drug court program do not waive the right to seek expanded sentences if they are later booted for violating probation, an appeals court says.

The precedential opinion in the consolidated cases of State v. Bishop, A-0048-11, and State v. Torres, A-1399-11, could impact thousands of enrollees in drug court — an alternative to prison for drug- or alcohol-addicted defendants who are charged with nonviolent offenses and have no history of violent crime.