Leighton Hay, a Toronto-area man who has spent 12 years in prison for a murder he says he did not commit, has been released from custody after Crown prosecutors decided to withdraw murder charges against him.

One year after the Supreme Court of Canada ordered a new trial for Hay because of fresh forensic evidence, the Crown announced Friday it had dropped charges of first-degree murder and attempted murder against Hay.

Justice John McMahon apologized as Hay was released.

"Nothing I can say will bring back 12 years. I apologize for the fact that it has taken this long for the justice system to get it right. I hope you have a long and fulfilling life," McMahon said to Hay, who then left the courthouse with his family without speaking to reporters.

Hay, now 31, was handed a life sentence in 2004, after being convicted of the murder of Colin Moore, 51, a prominent member of the Toronto Guyanese community.

Moore was shot and killed in July 2002, at a Toronto nightclub where he was hosting a fundraiser.

The Crown alleged at trial that Hay had acted as an accomplice to Gary Eunick. Eunick shot Moore eight times after he and his brother, Roger, refused to pay a cover charge to enter the nightclub and then sought shelter in its kitchen.

While Eunick's identity was never in doubt, Hay was convicted in part through hair samples.

The Crown argued Hay had gone home and shaved his head to prevent investigators from identifying him. They pointed to hair found in a newspaper in his bathroom garbage, as well as in a electric razor on his nightstand.

But Hay's lawyers conducted their own tests, and obtained the opinion of experts who said the samples were facial hair, not hair from the scalp.

Last year, the Supreme Court of Canada ordered a new trial for Hay after reviewing the fresh evidence concerning the hair.

Hay was also convicted based on the testimony of one witness whose reliability was later called into question.

Hay's lawyer, James Lockyer of the Association in Defence of the Wrongly Convicted, noted that the justice system is now realizing eyewitness testimony can be notoriously unreliable.

"This is a case of how mistaken eyewitness identification can lead to miscarriages of justice," Lockyer told reporters outside the court Friday.

"There's been a lot of those in Canada and other jurisdictions, and I just wish the court would better recognize the dangers that exist in eyewitness identification."

Hay, who has schizophrenia, spent most of his incarceration in the psychiatric wings of two Canadian penitentiaries.

His father told reporters that he always knew this day would come, and said he was grateful to his son's lawyers, the Supreme Court and Justice McMahon.

"The judge apologized for all the mistakes that they made and that was good. I'm happy," he said.

With files from The Canadian Press