The corruption trial of former Deerfield Beach Mayor Al Capellini finally came to an end Friday.

Broward Circuit Judge Marc Gold granted a motion from the defense for a directed verdict of not guilty before the case ever even went to the jury. Capellini walked free. It isn't known if the state will appeal Gold's decision. If it stands, the City of Deerfield Beach may be on the hook for hundreds of thousands of dollars in legal fees Capellini has accrued over the years since he was charged with receiving unlawful compensation in 2008.

Capellini, 66, who served as mayor of Deerfield Beach from 1993 to 2009, was accused of voting in favor of the Deer Park office project without disclosing that he had a $16,500 contract to provide engineering work on the development.

During testimony, Capellini said that his mistake was that he did not know what he had voted on. He said he didn't notice his project on the meeting agenda and thought he was voting on other items.

Capellini said that when he noticed the omission he consulted with the then City Attorney Andy Maroudis, who told him there was no way to correct his mistake.

Prosecutor Catherine Maus said the record showed Deerfield Park project was clearly listed in the agenda and there was no way Capellini could have missed it.

After his arrest and suspension, Capellini ran for re-election and lost. It took more than five years to bring his case to  trial.