They were schoolchildren, some not old enough for long trousers, but it was their revolt that set South Africa on the path to liberation. Thousands of them streamed from classrooms on to the streets of Soweto in a challenge to apartheid whose date is engraved in the country's history - June 16 1976.

Three decades later South Africa is preparing to celebrate the uprising as the turning point at which black people seized the initiative. Ceremonies today will honour the students as heroes who laid the foundations for freedom by energising a struggle that culminated in democratic elections in 1994.

The rhetoric and pomp, however, will mask a new struggle that is dividing former classmates in a way few imagined all those years ago when they stood shoulder to shoulder against dogs, bullets and teargas.

Some emerged from the tumult wealthy and successful, exemplars of a new nation where black people have the opportunity to thrive. Others emerged impoverished and bitter, members of an underclass that feels abandoned.

South Africa today is one of the world's most unequal societies. An emerging and increasingly confident black middle-class is fuelling a consumer boom while millions remain mired in unemployment and appalling living conditions.

Two former schoolboy rebels, Oupa Moloto and Robert Zondo, illustrate the divide. Both are based at Soweto's Hector Pieterson memorial, which honours a 12-year-old student killed by police. A photograph of his body, carried by a fellow pupil, became the revolt's iconic image.

Inside the red brick memorial building, the focal point for Friday's commemorations, Mr Moloto, 50, a successful businessman and member of the ruling African National Congress party, has an office where he helps coordinate anniversary events. In 1976 he was one of the student leaders who swept out of Morris Isaacson secondary school after the morning assembly was shattered by a pre-arranged signal, the revolutionary cry of "Amandla".

Furious at being forced to learn Afrikaans, the pupils were also fed up with parents who accepted apartheid's restrictions, and impatient with political leaders who were mostly in jail or exile.

Joined by pupils from other schools, dozens of marchers became hundreds, then thousands. Police, confronted with the most brazen challenge in years, became nervous and opened fire, killing at least 23 and possibly many more.

"We didn't realise they were shooting, it was like crackers," said Mr Moloto. The deaths triggered a riot that spread to other townships. The ensuing months of mayhem radicalised a generation and heralded apartheid's retreat.

Mr Moloto joined the ANC's underground guerrilla force but was caught and jailed for two years. He resumed underground activities after his release while working as a taxi driver - a step on the economic ladder that positioned him well when Nelson Mandela was elected president in 1994. "It gave us dignity and meant opportunities opened up. I was able to grow my business, get loans from the bank."

He acquired a fleet of five taxis, which funded his daughter's marketing degree, his son's advertising diploma and a comfortable life. "We have made a lot of strides under the new dispensation. We're going in the right direction."

His experience reflects that of a new black middle-class which is growing by 50% every year, according to University of Cape Town research, and driving a boom in BMWs and Tuscan-style townhouses. Black people, 80% of the 45m population, now account for 50% of the wealth, a sharp rise, according to Standard Bank.

Just yards from Mr Moloto's office at the memorial, hawking trinkets on the pavement and out in the cold of a southern hemisphere winter, stands Mr Zondo, 38, another former rebel. Just eight years old when sucked into the maelstrom, Mr Zondo saw Hector Pieterson collapse. "We thought he had just fallen, that he'd get up."

Mr Zondo completed secondary education but political turmoil stopped him getting a business degree. His back-up plan, to turn a precocious talent for tennis into a career, never materialised. He voted for the ANC in 1994 but, disillusioned by his inability to find work, did not vote again.

Unemployment, which stands officially at 26.7%, is, in reality, closer to 40%, one of the highest rates in the world, according to labour analysts. Not enough jobs have been created for those who reached working age in the past 20 years, forcing millions into an "informal" economy of windscreen washing, merchandise hawking, and activities not far removed from begging.

Mr Zondo lacked the capital to start his own business, and his school diploma did not secure employment. "I am down and out. Liberation has not brought more opportunities for me. Nothing tangible. And that's what I fought for." A single father, his takings are supplemented by a £15 government monthly grant for his son, aged eight. Still it was a struggle to pay for the books and uniform. "My boy might benefit from the freedom we won, but I'm not. I have not eaten today. Visitors to this place think black people are free now - they don't understand the economic struggle goes on."