A High Court judge at Ramsgate said it was with a heavy heart that he sentenced police killer Lwazi Mathumbu, 22, of Lamontville, to life imprisonment because he and others like him deserved the death penalty.

Mathumbu was found by the court on Friday to be the person who gunned down Inspector David Anderson, 34, of the Port Shepstone Crime Prevention Unit when he and a colleague, Inspector Cleriton Gumbi, pulled over a car driving with no lights while they were patrolling the area on the night of February 2 last year.

Unbeknown to them, the occupants were members of a gang of robbers escaping from the scene of an armed robbery at the home of a tuck shop owner, Thembile Skofu, and others at Mkholombhe.

The court found that a shootout had ensued between police and two of the robbers, and Anderson was killed.

One of the robbers - identified as Xolani Jinineka - was also killed, while Mathumbu was wounded in his shoulder and was later arrested.

Sentencing Mathumbu to life imprisonment for Anderson's murder and to seven years' imprisonment for the attempted murder of Gumbi, Judge Pete Combrinck paid tribute to the work of the police.

"Police officers sacrifice their whole lives to the protection of others. They go out every day and every night to risk their lives so that others may sleep safely. It is one of the most heinous crimes to take the life of such a person."

He said Anderson - a young man who left behind a wife and children - was going about his duty when his life was snuffed out.

Combrinck sentenced Sibongile Vundle, 35, of Bizana in the Eastern Cape, to seven years' imprisonment for his role as an accessory after the fact to Anderson's murder.

The court found that Vundle had supplied the guns for the robbery earlier that night and that, despite knowing that a policeman had been killed during the course of the incident, was still prepared to receive back the murder weapon (a .38 revolver) and hide it.

Mathumbu and Vundle, along with two other members of the robber gang - Lubabalo Hlambela, 23, also of Bizana, and Luvuyo Silangwe, 21, of Lamontville, were also each jailed for a further 15 years for robbery with aggravating circumstances.

A youth who participated in the robbery at a time when he was only 15 years old will await a probation officer's report before he is sentenced for his part in the robbery.

Combrinck found that although the youth, Hlambela and Silangwe were also present at the scene where the police officers had been shot at, they had not been armed and had not actively associated themselves with the shooting.

Instead, they immediately fled. For this reason they were acquitted of the murder and attempted murder.

Family and friends of Anderson cried and hugged each other after sentence was passed.

Anderson's widow, Heidi, said no sentence could ever be truly adequate, not even the death penalty.

"It's horrendous . . . nothing can ever bring my husband back to me. I'm left alone and my daughters (Jamie-Lee, 15, and Ashleigh, 13) have no father."