(CNN) -- A white teen convicted of murdering four blacks, including two children, in a racist killing spree in South Africa's North West province was sentenced Friday to four life terms in prison.
Johan Nel leaves the courthouse in January. He was sentenced Friday to four life terms in prison.
"I respect the court's decision, [but] we are going to appeal," the attorney for Johan Nel, 19, told CNN in a telephone interview. "We believe there is a possibility that the court made a mistake."
Nel, who was 18 when he committed the crimes in January, also targeted 11 others and was sentenced to 68 years for 11 counts of attempted murder. He also got five years for possessing a firearm and three years for possessing ammunition, the latter two without a license, Nel's attorney Frikkie Pretorius said.
He said his client missed when he shot at four of the 11 but managed to shoot and injure the other seven.
Pretorius said Nel killed a mother and the infant she was holding, a man in his 70s, and a 10-year-old boy. Aside from the mother and child, the people were not related.
Nel pleaded guilty to the crimes to avoid a trial, the lawyer said.
In announcing the appeal, Pretorius contended the court refused to consider "compelling circumstances" that affected the crime.
Pretorius said Nel was home-schooled and never learned to socialize with other children, especially black children. His upbringing played a major role, the lawyer said.
He also said, however, that a psychologist told the court Nel was mentally competent.
Nel shot the victims on the street in the farming settlement of Skierlik, the attorney said.
The BBC quoted witnesses who said Nel shouted racist slurs during the shootings.
"They were relaxing, and all of a sudden he came around the corner and he shot them," Pretorius said.
The Congress of South African Trade Unions, which Pretorius said has a large membership in the area of the shootings, said it welcomed the life sentences and additional prison time ordered by the court.
"No lesser sentence could possibly have been given for such an appalling crime, motivated purely by racist obsessions, for which there can be absolutely no mitigating circumstances," union spokesman Patrick Craven said in a written statement.
"COSATU agrees with the judge that there is no place for racially motivated violence in a democratic South Africa," he said.
Union members demonstrated daily outside the court when the case began as a way of trying to ensure that justice was done, Craven added.
The sentence was handed down in the Mmabatho High Court in Mafikeng, and several media reports said the judge and prosecutor received death threats aimed at stopping the court from giving Nel a life sentence.