NEWARK, N.J.— Two former aides to Gov. Chris Christie were sentenced to prison Wednesday for their role in a political revenge plot involving traffic jams at the country’s busiest bridge, a scandal that sank the Republican’s presidential aspirations.

Bill Baroni, Christie’s appointee to the Port Authority of New York and New Jersey, was sentenced to two years in prison, and Bridget Kelly, Christie’s former deputy chief of staff, was sentenced to 18 months in prison at separate hearings in the 2013 George Washington Bridge lane-closing case. Both must also serve 500 hours of community service.

U.S. Judge Susan Wigenton told both it was clear there was never a legitimate traffic study, as they have claimed, and said the 45-year-old Baroni misled a legislative committee by blaming the gridlock on one.

Get Breaking News Delivered to Your Inbox

“It was completely intended to wreak havoc,” she said. “It only served a punitive purpose. You clearly knew, and know today, that it was not” legitimate.

Referring to New Jersey politics, she told the 44-year-old Kelly that she “got caught up in a culture and an environment that lost its way.”

Court sketch of former Chris Christie aides Bridget Kelly and Bill Baroni at sentencing on March 29, 2017. Jane Rosenberg

The two were convicted in November of all counts against them, including wire fraud, conspiracy and misusing the bridge for improper purposes. The government’s star witness, David Wildstein, testified that he and the co-defendants sought to retaliate against a Democratic mayor for not endorsing Christie’s re-election. Text messages and emails produced at trial showed Fort Lee Mayor Mark Sokolich’s increasingly desperate pleas for help being ignored by Kelly and Baroni.

Kelly, who sent the infamous “time for some traffic problems in Fort Lee” email, wiped her eyes with a tissue and apologized, saying she never intended to cause harm.

“I accept responsibility for the tone of my emails and texts,” she said. “My emails and texts were disrespectful and I am absolutely embarrassed by them. They don’t reflect who I am.”

Assistant U.S. Attorney Vikas Khanna called Kelly the “impetus behind the crime.”

Baroni also apologized before sentencing, saying he accepted responsibility and made “the wrong choice.”

“I let a lot of people down who believed in me and relied on me. Most of all I let Mark Sokolich down,” Baroni said. “I was wrong and I am truly sorry, and I’ve waited three years to say that.”

Sokolich said the sentence was fair and that he hopes Baroni “gets through things and resumes his life” after he serves his term.

“I’m not a grudge kind of guy. It’s not really in my DNA,” he said. “I will tell you I’ve moved on with this. My responsibility is to the taxpayers of Fort Lee. To devote my energies to venom and dislike, it’s not my style.”

Assistant U.S. Attorney Lee Cortes said that Baroni’s time as a state lawmaker, lawyer and school teacher gave him the experience and judgment to conduct himself ethically.

“But when Bill Baroni was put to the test and made a choice, he chose to abuse his official power. And then he chose to lie about it,” Cortes said, calling Baroni’s conduct “brazen, calculated, and a mean-spirited abuse of power” that had “real-life consequences on the people he was supposed to serve.”

Lawyers for both defendants said after sentencing that they were looking forward to their pending appeals. Kelly said the fight was “far from over.”

The scandal derailed Christie’s presidential aspirations and likely cost him a chance to be President Donald Trump’s running mate. While the sentencing was happening Wednesday, Christie was at the White House to launch a drug addiction task force.

Questions remain over when, and how much, Christie knew about the plan to realign access lanes from Fort Lee to the bridge’s upper level.

Christie was not charged with any wrongdoing. But his version of events — that he was not aware that anyone in his office was involved until months after the fact — was contradicted by testimony from multiple people.

In addition to focusing on dozens of text messages and emails exchanged between the co-conspirators, testimony at the trial painted an unflattering portrait of the Christie administration’s modus operandi.

Christie was described as cursing and throwing a water bottle at Kelly over an apparently innocent question and another time leaving a profane and threatening voicemail for a county officeholder who had angered him.

Wildstein testified that Christie’s subordinates used the Port Authority, the bistate agency that oversees huge chunks of New York’s transportation and commerce infrastructure, as a source of political favors for Democratic politicians whose endorsements he sought.