WELLINGTON, Aug 18 (AFP) - A New Zealand man who spent nearly 18 years in prison for a murder he did not commit will receive a multimillion-dollar compensation package, the government said Friday.

Alan Hall was sentenced to life imprisonment in 1986 after a man was fatally stabbed during an Auckland home invasion.

There was no forensic evidence linking Hall to the scene, and the assailant was said to be of a different height and ethnicity, but Hall was found guilty nonetheless.

Hall was released on parole in 1994 only to be sent back to jail in 2012 for breaching the conditions of his release. He was finally released last year and acquitted.

New Zealand's Supreme Court admitted the initial trial had been unjust showing either "extreme incompetence" or "a deliberate and wrongful strategy to secure conviction."

Justice Minister Deborah Russell said Friday that Hall had accepted an offer of NZ$4.9 (US$3 million) compensation.

The New Zealand government "apologises unreservedly for his wrongful convictions and imprisonment", Russell said.

"I acknowledge that the apology and compensation can never completely remedy the injustice Hall has suffered," Russell added.

In a statement to local media, Hall's family said they were relieved the fight to clear his name was over. "Alan was 24 when he was arrested. He is now 61."