It was the kind of test few judges ever have to face: The South African High Court's Thokozile Masipa, former "tea girl" and crime reporter, faced the job of redeeming her widely criticized acquittal of Olympic athlete Oscar Pistorius in the full glare of the global media, amid one of the most divisive trials the country has ever seen.
She called it "a delicate balance." She warned that society couldn't expect to have its way on the sentencing, with Pistorius' circumstances having to be taken into account. And she cautioned that the public — in this case including the Twitterati who had dissected every moment of the 49-day trial — often had no idea of the difference between vengeance and justice.
With that, Masipa on Tuesday handed down a five-year prison term to Pistorius for the slaying of his girlfriend, Reeva Steenkamp, a sentence that could see him released to house arrest in as little as 10 months. His inspirational running career, in which he became the first double amputee to compete in the Olympics, was in effect ended as the International Paralympic Committee banned him from competition for the duration of his sentence.
Pistorius shot Steenkamp in his home in the early hours of Valentine's Day 2013 and said he had mistaken her for a burglar. Accepting his defense, Masipa last month convicted him of culpable homicide (akin to manslaughter) but acquitted him of murder.
The families of Pistorius and Steenkamp seemed to accept the five-year sentence. But the prosecution said it might file an appeal, an option available under South African law, and many people were outraged by what they saw as a shockingly lenient penalty for a lethal crime.
The dismay was evident in calls to radio talk shows and in the Twitter hashtag that sprang up almost immediately: #ThingsLongerThanOscarsSentence. Some examples: "Ebola life expectancy," "The time it took typing this tweet," "The Oscar trial itself."
Masipa found that Pistorius' crime — firing a lethal weapon four times into a toilet closet, knowing there was a person inside with no way of escaping — came perilously close to murder. She rejected a defense call for him to serve three years of house arrest, which would have allowed him to train and resume his athletic career.
Pistorius showed no emotion as Masipa handed down his punishment. Minutes later police led him away to a downstairs holding cell. Looking distressed, he briefly clutched the hands of members of his family before walking down the 23 courtroom steps into the gloom below.
Was it enough, especially after Masipa's decision last month to acquit him of murder? That was the question being debated throughout South Africa.
Pistorius' family and lawyers clearly thought the sentence was the best they were likely to get. A defense appeal could have risked a higher court increasing his term, and the athlete's uncle, Arnold Pistorius, ruled out such a move.
Though legal experts suggested that a five-year term might be seen as suitable for a common culpable homicide such as a fatal car accident, many questioned whether it was appropriate in this case, given Masipa's remark that Pistorius deliberately shot into the toilet closet knowing someone was inside.
Some legal analysts suggested that the judge erred legally in acquitting Pistorius of murder.
One law professor, James Grant of Witwatersrand University, said in a television interview that Masipa's verdict had left one area of South African murder law in "utter chaos" and that an appeal to the Supreme Court of Appeal was warranted to clarify matters.
A spokesman for the National Prosecuting Authority, Nathi Mncube, said the state was considering an appeal.
"There is an appetite to appeal, and we have 14 days to consider the law and ensure [that] the facts and the law allow us to appeal," he told reporters.
The state can appeal only on the grounds that Masipa erred in her legal reasoning, not on her assessment of the evidence.
The legal controversy concerns a complex area of law: whether Pistorius foresaw that firing four bullets could lead to a person's death but proceeded anyway. Under South African law, that constitutes murder.
At the sentencing Tuesday, Masipa pointed out that Pistorius had weapons training and knew the implications of firing into a small space where a person inside had no escape, a remark that sounded to some like a description of murder.
"Using a lethal weapon, a loaded firearm, the accused shot not one but four bullets through the door," the judge said.
"In the present case, the aim was to shoot the intruder," she continued. "The toilet was a small cubicle. An intruder would have had no room to maneuver or to escape, and what is more, the accused knew this fact."
She did, however, note Pistorius' explanation that if he had wanted to kill an intruder in the bathroom, he would have aimed higher.
Masipa, 67, who has 16 years on the bench, is an emblematic figure in South Africa. The eldest of 10 children in a poor family, she earned money for college by pushing a tea trolley and working as a clerk and messenger. She went on to become a newspaper crime reporter before earning a law degree in 1990, the year Nelson Mandela was released from prison. She was appointed a judge after only seven years as a lawyer.
Until the Pistorius case, she had a reputation for handing down tough sentences. Last year, she sentenced a serial rapist named Shepherd Moyo to more than 250 years in jail.
For many South Africans, seeing a black woman judging a privileged young white man in a case the media dubbed "the trial of the century" was a compelling sign of how far the country has come since the end of apartheid. For some, that point of pride was lost in verdicts and a sentence they found wanting.
But Masipa said she wasn't a participant in a popularity contest.
"Society cannot always get what they want," she said. "The general public may not even know the difference between vengeance and justice."
The judge rejected numerous aspects of the defense argument, dismissing Pistorius' most important witness at sentencing: probation officer Annette Vergeer, who called for three years' house arrest. Masipa scolded Vergeer as being slapdash, disappointing and biased. The judge found the arguments of defense lawyer Barry Roux to be "not on point."
And she said she was "uneasy" that defense witness after defense witness had "overemphasized" Pistorius' vulnerability and disability, when in fact he had "excellent coping mechanisms" and had achieved many things in life.
She embraced almost all of prosecutor Gerrie Nel's points on sentencing, except his central contention that Pistorius deserved 10 years in prison.
She said the public would lose confidence in the courts if sentences were too lenient, but that a sentence that showed no mercy could break a convicted person rather than help his rehabilitation.
"At the time the deceased met her death she was young, vivacious and full of life. The loss of life cannot be reversed. Nothing I say or do today can reverse what happened on Feb 14, 2013, to the deceased and her family," Masipa said. But, she said, she hoped the sentence would bring some closure to the family.
Because of his disability, Pistorius will serve his term in a hospital wing of Kgosi Mampuru prison in Pretoria and can use his own doctor and therapist.
Steenkamp's mother, June, looked relieved as the court adjourned. A lawyer for the Steenkamp family, Dup de Bruyn, told reporters outside that the Steenkamps felt justice had been done.
Kim Martin, Steenkamp's cousin, the only representative of the victim's family to address the court, last week testified that three years' house arrest would not fit the crime.
"We just feel that to take someone's life, to shoot someone that's behind a door [who] is unarmed, [who] is harmless, needs sufficient punishment," Martin said. "Our family are not people who are after revenge. Mr. Pistorius needs to pay for what he's done, for taking Reeva's life."