Ten years after a Long Island man was sentenced to 20 years in state prison for robbing the corporate headquarters of a distribution company, a federal judge has thrown out his conviction.

Eastern District Judge Joanna Seybert cited several reasons for granting defendant Hassan Nelson’s petition for a writ of habeas corpus, including errors by both the court and the defendant’s trial counsel.