The higher court judges issued a ruling that was completely contrary to South African law
I don't know why you keep saying this. The powers of the court on appeal are:
to confirm, alter or quash the conviction, and (where appropriate) to substitute the conviction on an alternative charge;
to confirm, reduce, alter or set aside the sentence or other order;
to set aside or correct the proceedings;
to give such judgment, or impose such sentence, or give such order, as the magistrate ought to have given, etc.;
to remit the case to the magistrate with instructions to deal with any matter as the High Court may think fit;
to make any order suspending the execution of the sentence, or releasing the accused on bail, that seems appropriate.
In addition to powers of automatic review, the court of appeal may also increase the sentence.
For an example of the approach of the appeal courts to an increase of sentence, see S v Salzwedel and Others
, an important case in South African criminal law and criminal procedure, heard in 1999. The respondents had been convicted of murder in a lower court. In sentencing them for a racially motivated crime, the court had accepted mitigation that they had been raised in a racist environment, and sentenced them to three years correctional supervision, a type of probation. The Supreme Court of Appeals set this sentence aside, as it had (and has) the power to do, and substituted a sentence of ten years imprisonment.