The Louisiana Supreme Court ruled Wednesday that the way cases are doled out in Orleans Parish Criminal District Court — where the district attorney can select dates for certain crimes and therefore determine which judge will get the case — does not violate the state constitution.

In a 5-2 ruling, the state high court overturned an appeals court ruling that found the Orleans Parish allotment system unconstitutional. The appeals court also granted a new judge for two co-defendants of former Saints safety and admitted serial rapist Darren Sharper.

Attorneys for former St. Bernard Parish sheriff’s deputy Brandon Licciardi and Erik Nunez had challenged the purportedly random system for allotting cases to the 12 district judges in criminal court, arguing that it allowed District Attorney Leon Cannizzaro to “judge-shop” in the Sharper case.

At issue was a system in which judges are assigned cases based on the date of the earliest offense in a bill of information or indictment. Often in sex crime cases where the date of the offense isn’t exactly known, the district attorney assigns date ranges to those alleged crimes.

Licciardi and Nunez argued that the range that Cannizzaro’s office chose for the first crime in a 9-count indictment issued in December 2014 in the Sharper case wasn’t based on any evidence. They suggested that Cannizzaro’s office plucked the date out of thin air to land Criminal District Judge Karen Herman, a former prosecutor, for the Sharper case.

The state 4th Circuit Court of Appeal agreed last summer and ordered a new judge to be randomly assigned to the case, as well as in another, unrelated rape case.

In a split ruling, the appeals court found that it didn’t matter whether Cannizzaro’s office deliberately chose that first date to secure Herman, only that it could have done so.

Cannizzaro’s office appealed, and after a December hearing, the Supreme Court ruled Wednesday that in Orleans Parish, “the district attorney’s actions do not drive the selection of judges in the system at issue; rather, the defendant’s conduct drives the date of offense listed on the indictment.”

Justice Jeannette Knoll authored the majority opinion. Justices Jefferson Hughes and John Weimer dissented.

The court found that the Orleans Parish system was “sufficiently random,” leaving the burden on defendants “to show some actual manipulation or resulting prejudice.”

Attorneys for Licciardi and Nunez, along with those of alleged rapist Tyrone Brown, failed to prove nefarious judge-shopping by Cannizzaro’s office, the court found.

The court added that Cannizzaro’s decision to select a July 1, 2012, date for the first alleged crime in the Sharper indictment, a human trafficking count against Licciardi, was “well supported and highly reasonable.”

In his dissent on Wednesday, Weimer noted that Cannizzaro’s office acknowledged that bad actors could manipulate the system by picking arbitrary dates for some crimes. Endorsing a system that allows that kind of engineering erodes “confidence in the integrity of the system,” Weimer wrote.

In a separate dissent, Hughes questioned the choice of the July 1 date by Cannizzaro’s office.

“This case will be noted by every attorney, teacher, law enforcement officer, and a great deal of the public,” he wrote. “Doubt in the fairness of the system and the ability of a party to legally manipulate the system cannot be tolerated.”

Herb Larson, one of Nunez’s attorneys, said he was reviewing the decision “to determine if further proceedings in the Supreme Court are appropriate.”

The ruling means Nunez and Licciardi are headed back to Herman’s Section I courtroom as the case moves forward to trial.

“The district attorney was certainly pleased with the court’s decision in the case. He’s looking forward to refocusing the office’s attention on the actual prosecution of the crimes,” said Christopher Bowman, spokesman for Cannizzaro’s office.

The legal challenge didn’t involve Sharper, who last June pleaded guilty before Herman to two counts of forcible rape and a charge of simple rape stemming from two separate incidents in 2013, while the Super Bowl winner was retired and working as an NFL Network analyst.

Sharper’s guilty plea in New Orleans came as part of a “global” deal to resolve allegations that he raped or attempted to rape nine women in four states. Neither Herman nor U.S. District Judge Jane Triche Milazzo, who also took a guilty plea from Sharper last year, have set sentencing dates for Sharper.

Licciardi and Nunez have pleaded not guilty to state charges that include aggravated rape, which carries a mandatory life sentence, as well as to federal charges that include a conspiracy to drug women for rape, among other counts.

Follow John Simerman on Twitter, @johnsimerman