WELLINGTON, New Zealand (AP) — The New Zealand government has agreed to pay more than half a million dollars to a man who spent 12 years in jail after he was convicted of killing five members of his own family but was later found not guilty at a retrial.

The David Bain case has proved one of the most notorious and divisive in the nation’s history.

Justice Minister Amy Adams said Tuesday the payment of 925,000 New Zealand dollars ($664,000) to Bain didn’t represent compensation. That’s because a report found Bain had not proved his innocence despite being acquitted on all five murder charges in 2009.

Adams said the payment instead was to recognize the amount of time and money Bain had spent seeking compensation, to avoid further litigation, and to finally conclude the case.