There was only one acceptable ending to Dominic Jude Bird's drug trafficking trial.
Not even Malaysia's perplexing and heavily weighted justice system could sentence a man to death once the lead detective in the case was convicted of intimidating and bribing witnesses.
In the final extraordinary twist to 19 months of hell, Mr Bird will stay alive largely because of a crooked cop who tried to have him legally killed via a hangman's noose.
At least that's how history will record Wednesday's acquittal of the 33-year-old from Perth.
But some of the evidence that flowed during the stop-start High Court trial in Kuala Lumpur still makes it difficult to separate fact from fiction.
For Mr Bird to escape the mandatory capital punishment for drug trafficking, he and his charismatic lawyer Muhammed Shafee needed to convince the judge the case was all about a bent detective dishing out payback.
The police, led by the now tarnished Insp. Luther Nurjib, argued Mr Bird was an Australian drug dealer successfully targeted in an undercover operation.
As difficult as it might be to believe, neither side had hard evidence that either scenario was true.
A former Fremantle Christian Brothers College student, Mr Bird decided to leave his father's home in the southern suburb of Success in late 2011 and try life in the Malaysian capital.
By January last year, he was living in a chic apartment and, according to his testimony, looking for customers in the city's police force to join his Golden Gains personal training business.
Through a former officer, who was working as his security guard and driver, Mr Bird said he met Insp. Nurjib and they entered into a commission-based client recruitment arrangement.
On the flipside, the detective said Mr Bird had no idea he was a narcotics cop and the personal training story was a fabrication.
The two versions of what happened leading up to Mr Bird's arrest on March 1 last year ran parallel to one another throughout the trial.
Because the prosecution failed to produce evidence, which would be standard in an Australian police undercover operation, it was open to Mr Bird's defence to completely refute the police version.
Text messages, said by the prosecutor Akram Gharib to prove that Mr Bird set up the drug deal, were not tendered.
There were no photographs offered by the prosecution that would show, as they argued, that Mr Bird arrived at a cafe meeting with the undercover officer carrying a shopping bag containing 167g of methylamphetamine.
Evidence of either would have destroyed Mr Bird's version.
He told the court the texts were about the personal training business and that it was Insp. Nurjib who turned up with the shopping bag before detectives posing as cafe customers pounced and arrested him.
Only one key aspect of Mr Bird's defence was challenged - and the evidence didn't surface in court and didn't come from the police or prosecutor.
When _The West Australian _published Mr Bird's evidence about being set up by Insp. Nurjib as payback for accusing the detective's friend of an affair with his girlfriend Katarina Popovic, the Perth woman hit back via her WA lawyer.
Ms Popovic, who left Kuala Lumpur before Mr Bird's arrest, was furious that Mr Bird put forward a "love triangle" scenario to explain his run-in with the law.
"Ms Popovic was not Mr Bird's girlfriend," the lawyer said. "She was not involved in any affair or love triangle."
When the prosecutor was asked by _The West Australian _why police had not gathered evidence along the way to support their supposedly well-planned drug sting, he said in Malaysia the word of a police officer was enough during any trial.
Less than three months later, the word of Insp. Nurjib was worthless.
Mr Bird's legal team of Mr Shafee and Tania Scivetti brought contempt proceedings against the officer, accusing him of pressuring witnesses and offering one a bribe.
Judge Karmadin Hashini upheld the complaint and fined the detective about $650.
Coming just a week out from the final defence and prosecution submissions in the case, it was like Mr Bird had won the lottery.
Drug trafficking prosecutions in Malaysia have about a 95 per cent success rate and the prosecutor in this case had never lost a capital punishment trial.
After both sides had summed up, the judge was expected to reserve his decision for at least a week.Instead, he took everyone by surprise by asking Mr Bird to stand. Within minutes the Perth man was free for the first time in more than 18 months.