Growing up in a crowded two-room house in Soweto township under apartheid, Thokozile Masipa often slept on a makeshift bed under the kitchen table. Too poor to go to university, she toiled as a clerk, a messenger, a self-described office "tea girl" and eventually a crime reporter.
It took 10 years of night studies, while raising two children and working day jobs, but she finally became a lawyer at the age of 43, and then a judge – only the second black woman in the country to do so. And this week, in the culmination of an extraordinary South African journey, the former tea girl from Soweto will decide the fate of one of the world's most famous athletes.
On Thursday, Justice Masipa will begin delivering the verdict in one of the most-watched trials in recent history: the murder trial of Olympic double-amputee hero Oscar Pistorius, who shot his girlfriend through a bathroom door last year.
The 66-year-old judge could convict him of murder or a lesser charge of culpable homicide, or she could free him entirely. Her decision could send him to prison for life, or a shorter jail term, or allow him to return to stardom in the global sporting arena.
The post-apartheid symbolism is stark. The prosecutor and defence lawyers, products of a system of white privilege, must now accept judgment from a black woman from Soweto's gritty Orlando East neighbourhood. It's a vivid example of South Africa's transformation, but also an inspirational story of a woman who overcame every obstacle that the apartheid system could throw at her, from poverty to sexism to racism.
"I love the image of these powerful elite lawyers kowtowing to a woman from Orlando East," said Jane Thandi Lipman, the Canadian director of a 2008 South African documentary about the country's female judges.
"She had to fight so hard to get where she is. It was sheer hard work and determination."
In the courtroom during the Pistorius trial, Justice Masipa was soft-spoken but stern, reprimanding the lawyers for their missteps and giving a tongue-lashing to journalists if their cellphones beeped.
But she has said her background has also made her compassionate toward poorer defendants. Growing up amidst crime and despair in Soweto, she saw suffering and hardship all around her.
"A lot of young children didn't have role models, because all they saw at the weekend was people getting drunk and getting stabbed," she said in a rare interview for Ms. Lipman's documentary.
"Children saw that happening, and most of them didn't really go to school with an aim to do something, they just went to school because someone said, 'You have to go to school.' That is why it means a lot for me that I was able to be something."
Justice Masipa was the eldest of 10 children. Five of her siblings died in childhood, and a brother was murdered in his twenties. Known as Matilda or Tilly in her youth until she switched to her African name, she lived with her husband in a tiny house of just one room "which served as a bedroom, bathroom, study room, you name it," she said.
After working in menial office jobs, she earned a university degree in social work in 1974, but apartheid made her career almost impossible. She worked instead as a crime reporter and an editor of the "women's section" – where she explored political and social issues that weren't traditionally written about in those pages.
A year after the 1976 Soweto uprising, with the police cracking down on dissent, she and other women reporters organized a demonstration in downtown Johannesburg, and were promptly thrown in jail for the night. They slept with newspapers as their blankets, defying orders to clean a clogged toilet and refusing to see themselves as prisoners.
The first newspaper where she worked was banned by the apartheid authorities, but she moved to another newspaper and began her legal studies at night, finally earning her degree the same year that Nelson Mandela was released from prison. Eight years later, in 1998, she became a pioneer: one of the first black female judges in South African history.
"To the young women in the townships where I've grown up," she said later, "I would tell them one thing: anything is possible."
Yet even today, in a country where black women represent about 40 per cent of the population, only about 15 per cent of South Africa's judges are black women.
In 2003, Justice Masipa applied for a position on the Constitutional Court, the country's highest court. When a bar association said she wasn't experienced enough, Justice Masipa tartly pointed out that this was always the argument that people used to protect the racial privileges of the past.
"This is not the first time that people have spoken about lack of exposure, lack of experience … and unfortunately it is not the last time," she told a panel of officials who interviewed her for the Constitutional Court job.
"What scares me is that those words are usually used by people who want to block transformation," she told the panel. "There are a lot of people out there who have got the potential, who can do the work, but because at the back of people's mind they've got this lack of exposure, lack of experience, people with the right kind of potential are not put forward."
As a judge, she has shown no tolerance for men who abuse women. In one of her most famous judgments, she imposed a 252-year sentence on a serial rapist who had attacked women "in the sanctity of their own homes, where they thought they were safe."
Her court rulings have revealed an utter fearlessness of South Africa's most powerful institutions. She ruled against the Johannesburg city government when it tried to evict squatters without finding new housing for them. She told prosecutors to investigate police who had tampered with evidence in a case before her.
Under the glare of the world's spotlight this week, she will need all of that fearlessness again.