The Supreme Court on Monday found that a criminal defendant can be sentenced for violating his supervised release, even if the release expires while he is incarcerated ahead of facing new charges.

The justices, divided in the 5-4 decision, ruled against Jason Mont's argument that a district court shouldn't be able to charge him for violating his release because the term had expired at the time of the new sentencing.

Justice Ruth Bader Ginsburg sided with conservative Justices Clarence Thomas, John Roberts, Samuel Alito and Brett Kavanaugh in the majority. Justice Neil Gorsuch joined liberal Justices Sonia Sotomayor, Stephen Breyer and Elena Kagan in opposing the decision.

Mont had previously been convicted on felony drug and gun charges and served 84 months in prison before beginning a five-year supervised release due to end in March 2017.

However, he faced other charges in 2015 and 2016 and was incarcerated in state jail in June 2016. After several delays of a hearing, a district court heard and ruled that Mont had violated his supervised release and imposed another prison sentence.

Mont had opposed the new 42-month sentence, set to run after completing the sentence for his new charges, which he pleaded guilty to. He said that he shouldn't face the new sentence because the court had repeatedly delayed the hearing until after the end date for his supervised release term.

Thomas wrote in the majority opinion that "time in pretrial detention constitutes supervised release only if the charges against the defendant are dismissed or the defendant is acquitted."

"This ensures that the defendant is not faulted for conduct he might not have committed, while otherwise giving full effect to the lawful judgment previously imposed on the defendant."

However, Sotomayor wrote in the dissenting opinion that she doesn't agree with the majority's reasoning "that a person 'is imprisoned in connection with a conviction' before any conviction has occurred."