A judge branded Xolile Mngeni, who shot Mrs Dewani while on her honeymoon with husband Shrien Dewani, “a merciless and evil person” who deserved the maximum punishment.

South African prosecutors allege that Mr Dewani orchestrated her murder by hiring local accomplices to carry out the killing on his behalf.

“He had no regard to her right to freedom, dignity, and totally disregarded and showed no respect to her right to life by brutally killing her with utter disdain,” Judge Henney said of Mngeni.

In August Mngeni’s accomplice Mziwamadoda Qwabe pleaded guilty to killing Mrs Dewani, and was given a 25-year prison sentence. Zola Tongo, the taxi driver that police say Shrien Dewani asked to plot the killing, earlier received an 18-year prison sentence.

Both Tongo and Qwabe have said Mr Dewani wanted it to look like he was not involved in his wife’s death and they planned to have the attack look like a carjacking in Cape Town’s impoverished Gugulethu township.

Officials at first thought the crime was robbery. The rate of violent crime is high in South Africa but attacks on foreign tourists are rare.

Mr Dewani has denied he hired anyone to kill his wife and was allowed to leave South Africa for the United Kingdom, where he was later arrested.

His lawyer told the court in July that he needed at least a year to recover from depression and post-traumatic stress disorder before being potentially sent back to South Africa.