An accused gang leader in Calgary on trial for several charges, including first-degree murder, was allowed to walk free after a judge ruled there were unreasonable delays in the case.

Nicholas Chan was charged with first-degree murder in the 2008 shooting death of Kevin Anaya. The 39-year-old man was also charged with conspiring to murder rival gangster Kevin Bontagon, as well as directing a criminal organization.

On Tuesday, the judge stayed all three charges because the case took too long to get to trial. The court dismissed the jurors and Chan was set free with no conditions on his release.

Chan is the first accused murderer in Alberta to have charges against him stayed because of unreasonable delays in the justice system.

With files from CTV Calgary