The Crown case was simple, up until the bombshell of the note.
Ferguson argued with his girlfriend about her perceived relationship with a Karitane man, supposedly throttled her and then the pair drove out to see the third party.
On the way, another spat allegedly turned physical and the woman crashed the truck into a ditch.
The Crown said she walked the rest of the way to Karitane, followed at least half an hour afterwards by a furious Ferguson.
In a jealous rage, the defendant smashed his way into the home and took bloody revenge with a metal bat.
But then the letter emerged.
Ferguson's girlfriend, sitting in the witness box, explained the code.
"The dinosaur" was the Karitane man, the "toy" was a Glock handgun he allegedly had and "the preacher" referred to Ferguson.
It was the first mention of a firearm.
The witness elaborated.
When she went to see the complainant in hospital days after the beating, which left him almost unrecognisable, he told her he had gone for his gun on the night of October 19 and had been planning to shoot Ferguson.
The woman - whose name is suppressed - wrote the coded letter to her partner and claimed she had raised the issue with police before the trial, although that was vehemently denied by the officer in charge.
It was a case of self-defence, Westgate told the jury.
Ferguson, who gave evidence, said he had not taken a softball bat to the address - nor was one ever found - and that the resident was the aggressor.
He said the man aimed a blow with a piece of wood, which he dodged, before wrestling the timber from him.
The defence case was that the beating only occurred in the complainant's bedroom as he reached under his bed for a gun.
Ferguson had previously been told the man had a "people stopper" and would administer "the old lead pill".
"The only way he could stop you was by hitting you with a piece of wood. He kept hitting you until you finally stopped [reaching for the weapon]," Westgate suggested to the Karitane man.
Although the man described that version of events as "bulls***", the jury was not so sure.
Furthering the defence case was the fact that the complainant, despite suffering a broken foot, donned gumboots and went outside the house for some minutes before calling police and returning indoors.
That, Westgate said, was consistent with him disposing of a gun before officers arrived.
When the not-guilty verdicts were read, Ferguson breathed several audible sighs of relief and held his head in his hands.
He cried as he thanked the jurors.
After leaving the dock he embraced supporters at the back of the courtroom.