A three-judge appellate panel in Philadelphia on Tuesday affirmed most of the convictions of two onetime allies of former New Jersey Gov. Chris Christie charged in the Bridgegate scandal.

But the panel tossed two of the convictions and ordered a new sentencing hearing for Bridget Anne Kelly and Bill Baroni.

Tuesday's decision marked the latest turn in what has now been a five-year saga, one that has lingered well beyond Christie's tenure and places two key aides a step closer to prison. The case could make its way to the U.S. Supreme Court.

Kelly, Christie's former deputy chief of staff, and Baroni, the governor's top executive appointee at the Port Authority of New York and New Jersey, were convicted by a federal jury in 2016 on seven counts each of conspiracy, wire fraud, obtaining by fraud and intentionally misusing government property, and civil rights charges.

Their convictions stemmed from their role in a 2013 scheme to cause traffic problems near the George Washington Bridge — the world's busiest span, which connects New Jersey to New York City — in order to punish a local mayor for his refusal to endorse Christie's reelection campaign that year.

Kelly was sentenced to 18 months in prison, and Baroni two years. Both have remained free on bail pending their appeals.

The jury had found Kelly and Baroni guilty of conspiring to violate Fort Lee residents' rights to intrastate travel.

The appeals panel disagreed, writing in a unanimous precedential opinion Tuesday that there was hardly a "robust consensus" that this constitutional right exists, so the defendants didn't have a "fair warning" that they were committing a crime.

Michael A. Levy, a lawyer for Baroni, said his client was gratified by that part of the court's decision. "What remains from this unprecedented prosecution are convictions only for the supposed misapplication of a few thousand dollars of Port Authority resources over less than one week," Levy said in a statement. "We disagree that any resources were misapplied and are evaluating further appellate options."

Michael Critchley, an attorney for Kelly, said he would take his client's appeal to the Supreme Court.

A spokesperson for the U.S. Attorney's Office in Newark said the government was reviewing the opinion, adding that he didn't know when the new sentencing would take place.

The underlying facts of the case weren't in dispute.

Under the guise of a sham "traffic study," Kelly and Baroni worked with fellow Christie ally David Wildstein, then a Port Authority executive, to reduce the number of toll lanes available to motorists traveling from Fort Lee, Bergen County, to the bridge from three to one.

This led to four days of gridlock in Fort Lee, exacerbated by the fact that the Christie allies refused to alert local officials of the lane realignment ahead of time. The governor long maintained he had no role in the closings.

The story blew up in January 2014, just as Christie was emerging as a top contender for the GOP presidential nomination, after Wildstein provided emails and other documents to a state legislative committee investigating the lane closures.

"Time for some traffic problems in Fort Lee," Kelly had written to Wildstein in an August 2013 email. "Got it," he responded.

Wildstein pleaded guilty in 2015 and testified against Kelly and Baroni at trial. He was sentenced to three years' probation, fines, and community service, as prosecutors praised his "extraordinary cooperation."

Prosecutors based the civil rights charges against the two defendants on a 1990 decision by the Third Circuit that found "the right to move freely about one's neighborhood or town, even by automobile, is indeed 'implicit in the concept of ordered liberty' and 'deeply rooted in the nation's history,' " and was therefore a fundamental right under the Constitution's due process clauses.

The 1990 decision stemmed from a dispute over a traffic ordinance in York, Pa.

The three-judge panel on Tuesday wrote that although the Third Circuit had recognized a right to intrastate travel, other jurisdictions had issued decisions contradicting that position, and the Supreme Court hasn't recognized it.

The appeals court, however, upheld all the other convictions.

Defense attorneys had argued that Baroni, as a high-ranking Port Authority official, had the authority to realign the lanes to the bridge, and thus didn't misuse the bistate agency's resources. The court disagreed, noting that Baroni "had to create the traffic study cover story to get Port Authority employees to implement the realignment."

A lawyer for Kelly also argued that her actions were indistinguishable from a mayor who, during a snowstorm, orders crews to prioritize plowing the streets where political allies live.

This argument wrongly conflated motive with intent and conduct, the court said.

"Defendants altered the bridge's decades old lane alignment — without authorization and in direct contravention of Port Authority protocol — for the sole purpose of creating gridlock in Fort Lee," Judge Anthony J. Scirica wrote for the panel.

"To execute their scheme, they conscripted fourteen Port Authority employees to do sham work in pursuit of no legitimate Port Authority aim," he continued. "That Defendants were politically motivated does not remove their intentional conduct from the ambit of the federal criminal law."