Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Former allies of New Jersey Gov. Chris Christie were sentenced to prison Wednesday for engineering lane closures at the George Washington Bridge as alleged retaliation against a Democratic mayor who didn't endorse the governor.

Bill Baroni, who served as deputy executive director of the Port Authority of New York and New Jersey, will spend two years behind bars and must do 500 hours of community service. His co-conspirator, Bridget Anne Kelly, was sentenced to 18 months in prison, plus a year of probation. Both said they'll file appeals.

The sentencing drew a response from Christie's camp — but in regards to U.S. District Judge Susan Wigenton's comments to Kelly that she "got caught up in a culture and environment that lost its way."

In a statement, Christie spokesman Brian Murray called her remark "ill-advised" and based on "perjurious testimony of three convicted felons" — referencing Baroni, Kelly and David Wildstein, a third Christie operative involved in the scheme.

"The work of the people who have been employed by the Governor's Office has been honest, honorable, bi-partisan and effective," Murray said. "The actions of the felons was the sad and unacceptable exception to the way the office has conducted itself for 7 years."

During the sentencing, Baroni's defense lawyers argued for leniency, noting his longtime work as an FBI informant when he was a state lawmaker.

"I regret more than anything that I allowed myself to get caught up in this," Baroni told Wigenton. "I failed."

Assistant U.S. Attorney Lee Cortes said that Baroni should have known better and should have gone to authorities when he learned of the plot, but instead tried to cover it up.

Baroni "corrupted his office to send a petty, vindictive political message," Cortes said. He called Baroni's behavior "out of the playbook of some dictator in a banana republic."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: Bridgegate: Two Former Aides to Chris Christie Convicted in Lane-Closure Scandal

Before imposing the sentence, Wigenton told Baroni, "This is a sad day for the state of New Jersey, and in particular for you."

She added: "You have lived a life of service...that makes the offense that much more perplexing."

When her turn came, Kelly apologized for “disrespectful” emails and texts she sent about the lane closures ─ which included the infamous "Time for some traffic problems in Fort Lee."

Crying, Kelly told the judge, “I never intended to harm anyone.”

But the divorced mother of four also maintained her innocence, telling reporters afterwards: “I will not allow myself to be the scapegoat in this case and I look forward to the appeal.”

Wigenton told Kelly she was guilty of using her position “to exact revenge” and said the traffic study excuse was not believable.

"I don't believe you're a victim," Wigenton said.

Wednesday's courtroom appearances closes a chapter on the more than three-year-old scandal known as Bridgegate, which brought down members of Christie's inner circle and damaged his attempt to run for president. Witnesses at a fall trial alleged Christie knew about the plan beforehand. But Christie was never charged, and he maintains that he knew nothing about it until after it broke as a news story.

Baroni and Kelly have said they believed the lane closures were for a traffic study and not a political retribution plot. They were seeking sentences of probation.

Related: Ex Christie Aide: I Told Gov. About ‘Bridgegate’ Lane Closures

Meanwhile, Wildstein has admitted to cooking up the plot and testified that Kelly and Baroni helped him carry it out. He has alleged that he and Baroni spoke to Christie about the closures as they were happening. Wildstein, who cooperated with the feds as part of a plea deal, has not yet been sentenced.

The scandal stems from the September 2013 lane closures in Fort Lee, on the New Jersey end of the George Washington Bridge, and where a Democrat, Mark Sokolich, was mayor. Christie was running for re-election that year on a platform as a bipartisan consensus-builder, and was aggressively seeking Democratic endorsements. Sokolich was a holdout.

Bridget Kelly arrives for sentencing at federal court in Newark, New Jersey, on March 29. Seth Wenig / AP

That August, Kelly emailed Wildstein calling for "traffic problems." He replied, "Got it." Later emails captured them discussing the closures, which began Sept. 9 and caused massive jams on Fort Lee roads.

The lanes were reopened on Sept. 13.

Kelly and Baroni were convicted on Nov. 4 of conspiracy, wire fraud and other charges.

Prosecutors asked for three to four years for each, accusing them in a court filing this week of lying during their trial last fall.