South Africa's education and finance ministers are being taken to court over poor standards at state schools. The BBC's Karen Allen investigates the education crisis and why some parents in Eastern Cape province are opting to send their children to private schools despite the cost.
"We are not a flashy family - I'm just an ordinary kid," says Simanye Zondani, 17, as he pores over his maths homework in the subdued light of his home.
Since his parents died, his aunt has given up her smart "bachelorette" flat in Queenstown and opted instead for a house in the township.
It means she can now just about afford the £700 ($1,100) to send her nephew to private school.
Five thousand children, most of them from black families on modest incomes, are switching to independent schools annually.
The quality varies, but in Gauteng province alone, South Africa's economic hub, more than 100 new schools have applied for registration in the past year.
It is a response to a sense of failure in the state sector, argues Peter Bosman, the principal of Getahead High School, the low-cost private school which Simanye attends.
"Parents want consistency and quality," he says - not with a sense of schadenfreude but resignation.
Vacant posts and pit latrines
The irony is that significant numbers of parents who send their children to private schools are themselves teachers in the state sector.
For the past few years, the school has achieved pass rates of 83%-100% for the secondary school-leaving certificate known as matric.
It is an impressive figure and is replicated among other low-cost private schools in deprived areas.
Nationally, fewer than half of all school leavers pass that exam - an indictment of an education system that is dysfunctional, critics say.
Far from being well-endowed with land and smart buildings, Getahead High is situated in a disused warehouse.
It offers computers and sports facilities, which the vast majority of children who attend state schools can only dream of. But the principal insists it is not about bricks and mortar, but the quality of teachers.
Many of the staff have returned from retirement to teach at the school and earn 10% less than their counterparts in the state sector.
About 30km (18 miles) down the road, a rural state school, Nonkqubela Secondary, is struggling with outdoor pit latrines which have fallen into disrepair, while a third of all teaching posts remain vacant.
"We used to have good results, but we are short of maths teachers, science teachers and when staff look at our facilities they decide not to come here," head teacher Khumzi Madikane laments.
He says he cannot blame parents who can afford it, migrating to the private sector. But most of his pupils are dirt poor.
Education in the Eastern Cape is in crisis, and the central government has taken over the running of the department after allegations of corruption and mismanagement.
It is a sad indictment of a rural slice of South Africa which in the past century gave birth to some of the greatest minds in history, including Nelson Mandela and the late freedom fighter Walter Sisulu.
But the Eastern Cape is not alone. The growth of low-cost primary schools, in response to a lack of faith in the state sector, is a trend that is spreading across the country. The independent sector has grown by 75% in the past decade.
"It's been driven by parent demand," argues Ann Bernstein from the Johannesburg-based think tank, Centre for Development and Enterprise.
The crisis no longer a dirty little secret, with the government itself admitting that 80% of state schools are failing.
In a recent speech, Basic Education Minister Angie Motsheka revealed that 1,700 schools are still without a water supply and 15,000 schools are without libraries.
Last week, campaign group Equal Education launched a court case to force the government to provide equal infrastructure at all schools.
Ms Motsheka has already promised reforms and investment in infrastructure, but it is a Herculean task.
It also requires political courage, argues Ms Bernstein.
"We have research from various communities, and increasingly from government, saying that in many places, teachers are not in school on Mondays or Fridays, that many teachers have other jobs simultaneously and the actual amount of teaching going on in the classrooms is a fraction of what it should be," she says.
Political courage, it would seem, means tackling the unions.
Yet education in South Africa still suffers from the legacy of apartheid, where black children suffered inferior education to their white counterparts and were banned from certain subjects and deprived of good facilities.
But more than 17 years after the end of white minority rule, observers argue that South Africa is struggling with more recent phenomena: Poor teacher training, corruption and maladministration, a highly unionised teaching profession and low morale.
Back in the township, opting for a private school has come with huge sacrifices for Simanye's aunt, Nokwezi.
"I've really had to squeeze myself but it is worth it - in state schools, if they have a disagreement the teachers go on strike," she says.
The surge of low-cost private schools shows no sign of slowing down. Thousands of other grandmothers, brothers and sisters are scraping together the funds to send a child to school.
Yet the vast majority of South African children have little choice but to opt for the local state school.
Despite the best efforts of some committed staff, the exodus from state schools could see a generation of underachievers left behind.