One of New Zealand's most controversial child sex abuse cases has come to an end in the Supreme Court this afternoon, with Peter Ellis' convictions being quashed once and for all.
A panel of five judges handed down the final decision on the case just after 2pm - even though the man at its centre is not alive to see it.
The Herald takes a look at the twists and turns of the 31-year case.
What were the allegations?
Peter Ellis shot to infamy three decades ago when he was accused of bizarre and horrifying offences of satanic rituals, torture and sacrifice against preschoolers while he worked at the Christchurch Civic Creche in 1991.
The claims came at a time when "satanic panic" was sweeping the nation, and the accusations against Ellis were later labelled a "witch hunt" by author Lynley Hood.
Children said Ellis and other teachers hung them from the ceiling in cages, made them eat faeces, and cut their genitals off.
Other allegations included having sticks inserted into their bottoms, needles stuck into them, being placed in coffins, and taking part in ritual killings and mock marriages.
Children also said they were forced to kick each other in the genitals as adults stood around them in a circle playing guitars.
Ellis was found guilty in 1993 following a six-week trial, and was convicted of 16 charges relating to child sex abuse against seven children. He was acquitted on 12 other charges. He was sentenced to serve 10 years in prison.
The case has been heavily criticised and has gone through years of appeals, with Ellis' bid to have his name cleared continuing even after his death from bladder cancer in 2019.
How it began
In November 1991 a parent purchased a black puppy from Ellis. He showed the woman's 3-year-old son how to distinguish the gender of the puppy, and a few months later the woman told police her toddler told her he didn't like Ellis' "black penis".
Police launched an investigation, and while the child in question made no allegations against Ellis, they went on to interview the children in the creche.
The crèche's parent management committee then held a meeting with parents in December, asking them to look for any significant behavioural changes in their children and any events which might explain them.
When police initially interviewed the children, none reported any sexual abuse at first. But they continued to progress interviews until a child made an allegation in January 1992.
Overall, there were interviews of 118 children, most of them disclosing no abuse.
Ellis was arrested and charged in March 1992. Four of his coworkers were also charged, but the charges against them were dropped.
A shadow on the claims
Three of Ellis' convictions were set aside in 1994 after one child said she had lied, adding fuel to the fires of doubt about the rest of the allegations.
But despite two Court of Appeal bids and a ministerial inquiry in 2001 by Sir Thomas Eichelbaum, as well as three petitions to Parliament for a royal commission, Ellis remained a convicted man.
His final appeal to the Supreme Court was nearly derailed by his death - five weeks before the appeal was due to start - but a landmark ruling allowed it to continue posthumously.
A litany of failures in the investigation and trial process poured out during the appeal, detailing multiple instances where the contamination of evidence was enabled.
In the months after Ellis' arrest a support group was formed for the parents of the complainants, and one of the mothers made a list of the allegations against Ellis and provided it to the other parents to take home.
Some parents questioned their children in direct terms about the possible abuse, which the defence said at trial led to contamination.
Ellis' lawyers argued the interview techniques used for the children fell far short of best practice even for that time period.
They also said expert witnesses at the trial did not properly assist the jury, and one of the experts gave unreliable evidence.
That expert, Christchurch psychiatrist Dr Karen Zelas was found by the Court of Appeal sometime after the trial to have "gratuitously" exceeded the scope of permissible expert opinion.
In the latest appeal, Ellis' lawyer Rob Harrison said Zelas' evidence improperly bolstered the complainants' evidence, and that she gave the jury incorrect assurances.
He also argued the jury were not given appropriate expert evidence about memory evidence.
Another ground of appeal was that the trial was unfair. He said the charges were "sanitised", leaving out many of the more bizarre allegations. The defence was also constrained in their ability to play the evidential videos containing those allegations to the jury.
Furthermore, the jury were given transcripts of the video interviews played by the Crown, but not of the cross examination relating to those interviews.
The Crown's response
Crown lawyer John Billington KC said the contamination of evidence issues were put before the jury at the time of the trial, and no new, significant information about contamination had been brought forward by the defence.
The fact the jury had acquitted Ellis on some charges indicated they may have taken contamination into account.
He also said the Supreme Court was limited in how it could judge the way the interviews were carried out in 1992 when comparing them to today's best standards which were themselves still developing.
As for the argument over an unfair trial, Billington said the prosecutor at the time pursued the correct charges under prosecution guidelines in force.
Some of the allegations did not have enough evidential foundation to justify prosecution, some were too young or their parents didn't want them going through a trial.
The jury was still able to hear about the more bizarre allegations, and if those videos had been played to the jury it could have opened up a ground of appeal based on irrelevant and prejudicial evidence.
As for the transcripts provided to the jury, Billington said it was appropriate not to give them everything was consistent with practice at the time, and appropriate due to the length and quality of some of the tapes.
In the long lead-up to the Supreme Court appeal, the judges faced a new challenge.
Decades on from the trial, a new complainant came forward with more allegations against Ellis, saying he raped her while babysitting, and said if she told anyone she would die and "witches, demons and monsters would come".
The complainant approached police in February 2019 and the matter was not sent to the Crown until September - the same month Ellis died. He was not given an opportunity to respond to the allegations before his death.
Harrison said the complainant was said to have gone to a police station in 1992 or 1993 to complain but the matter did not go any further until she approached police again.
He pointed to several issues with this, including that Peter Ellis' name was known across New Zealand by that point in the 90s due to the accusations.
"I cannot believe that a complainant would have walked into a police station in 1992 and 1993 and complained about Peter Ellis sexually abusing them, and nothing happening," he said at a hearing to discuss the matter in 2020.
Billington said the woman's sister was also able to provide evidence corroborating her claims.
At the time, the Supreme Court adjourned the case until the police could do a full investigation, and ultimately ended up dismissing the new affidavits, citing causes for concern around her evidence.
Why was the appeal allowed to continue after Ellis' death?
The landmark decision to allow the appeal to continue drew heavily on legal arguments about tikanga Māori, and the importance of restoring Ellis' mana after his death.
"In a tikanga context the death not only is not irrelevant ... but an ancestor has even more reputation to protect - is more tapu, has more mana. So the Māori perspective on this I would have thought would be opposite to the anglo perspective," Justice Joe Williams said when the issue of tikanga was first raised.
The comments were in response to arguments from Solicitor General Una Jagose that Ellis' interests died along with him, and there was no exceptional reason to continue the case.
At a hearing to argue the importance of tikanga, Ellis' lawyer Natalie Coates said Māori and Pākehā both had mana, and that the importance to restore and uphold it "transcends death".
The court accepted the part tikanga played in the case and that, among other arguments, prompted them to allow the appeal to go ahead.
What does the decision say?
The 152-page decision from the Supreme Court delves deep into the claims against police, Crown and expert witnesses.
The main focus of the decision was the evidence from Zelas, and the contamination of the children's evidence. Other appeal points were considered less significant.
A now-repealed section of the Evidence Act 1908 allows an expert witness to give evidence in a case involving allegations of sexual offending against children on various matters.
"The most significant of those was whether evidence at the trial relating to a child complainant's behaviour was consistent or inconsistent with the behaviour of sexually abused children of the same age group as the complainant," the decision said.
"Experts were not permitted to suggest that behaviours were diagnostic of sexual abuse or to comment on (or appear to comment on) the credibility of a complainant."
Zelas evidence highlighted 20 behaviours in the complainants she said were consistent with those of sexually abused children, including common child behaviours such as troubles with sleep and bedwetting, but also sexualised behaviour.
"The Court has found that Dr Zelas' evidence lacked balance, did not inform the jury of other possible causes of the behaviours (or, where she did so, discounted or minimised the other causes) and involved circular reasoning.
"In several respects, it went outside the scope of evidence permitted under [the section] and in those respects should not have been admitted as evidence at the trial."
The extent of the inadmissible material and the extent to which Zelas departed from the appropriate standards while giving evidence may well have caused a miscarriage of justice, it said.
The court acknowledged the difficulty of that piece of legislation and noted there were other people in the trial process whose responsibility it was to make sure the evidence stayed within the boundaries.
As for contamination, the court decided while the risk of contamination was canvassed at trial, the jury was not "fairly informed" about the level of risk.
"The expert evidence at the trial had given the jury a false sense of reassurance both that the contamination risk was low, and that if the evidence was contaminated the jury would be able to detect that."
Evidence now, taking into account research in the intervening period, showed the risk was higher than the jury was led to believe and contamination would not have been readily detectable.
In the issue of the "sanitisation" of the charges at trial, and the failure to play all the evidential interviews, the court found the Crown's selection of charges did not create a miscarriage.
Failing to provide all transcripts to the jury was an "unsatisfactory aspect" of the trial, but the court would not have allowed an appeal on that point alone.
In summary, the court described the case as one possessing "immense challenges".
In a statement, the court said the release of the judgment marked "the end of a long and painful journey through the courts for the many people involved in this case".
"The case posed significant difficulties for the parents of the complainants. They were in an impossible position - parental love and concern would have made it very difficult to not ask their children direct questions about the alleged offending or discuss the case with other parents during the investigation phase."
The court said its judgment was not to be read as a criticism of the parents, the complainants, or those involved in the investigation and trial.
"The special care and attention required for a case of such unprecedented complexity was underestimated at the time of the investigation and trial, and this resulted in a miscarriage of justice."