John Connolly, the corrupt FBI agent who helped Whitey Bulger and spent years in jail in Florida, had his case overturned on Wednesday.

The corrupt FBI agent who shared information with James "Whitey" Bulger had his murder conviction in Florida overturned by an appeals court on Wednesday.

The Third District Court of Appeal in Florida issued its opinion on former FBI agent John Connolly's case on Wednesday.

"We grant Connolly’s motion for rehearing, vacate the conviction and sentence ... and remand with instructions to discharge him," the court wrote in its decision.

Connolly was sentenced to 40 years in prison following his 2005 indictment that accused him of being involved in the murder of businessman John Callahan. Bulger associate John Martorano testified last year during Bulger's trial that he fatally shot Callahan in 1982 over dealings with the sale of Florida's World Jai Alai.

Prosecutors in Florida argued that Bulger and his associates, along with Connolly, met many times in planning and discussing Callahan's murder.

While Connolly was indicted on first-degree murder murder and conspiracy to commit first-degree murder. A jury acquitted him of the conspiracy charge, but found him guilty of second-degree murder as a lesser included offense of first-degree murder. That finding was then reclassified to a life felony, not barred by the statute of limitation.

Connolly appealed the reclassification of his conviction for second-degree murder.

"Connolly’s conviction for second-degree murder with a firearm should not have been reclassified to a life felony in order to circumvent the statute of limitation on the underlying first-degree felony," the court wrote.