In 1959, Hugh Lewin, who has died aged 79, joined the South African Liberal party: shortly afterwards it became the only legal non-racial political party in the country, with the banning in 1960 of Nelson Mandela’s African National Congress.
 
Frustrated at the ruthless police state repression, Hugh joined the clandestine African Resistance Movement and embarked on a sabotage campaign, targeting government installations such as electricity pylons.
 
ARM members were soon arrested after the police discovered its entire cell structure and its plans at the Cape Town flat of the national organiser, Adrian Leftwich, also a prominent Liberal. Best man at Hugh’s wedding, Leftwich turned state witness to convict him at his 1964 trial, as did his close friend and co-conspirator John Lloyd.
 
Hugh told the judge: “I was terrified. Instinctively I was opposed to any form of violence and I knew that I was not suitable for the active role I was being asked to play … [but] I thought that sabotage might shock the whites into an awareness of the conditions under which blacks were living and, in due time, change the system. The motive was to shock, not to injure.” He was sentenced to seven years in jail.
 
With typical modesty, he later described his prison sentence as “a parking ticket” compared to the much longer jail terms of the Robben Island prisoners who included Mandela. But he was seriously tortured, beaten regularly, constantly intimidated, and subjected to the pettiest cruelties. Like other white “politicals”, he was pilloried for betraying white volk.
 
But Hugh’s spirit remained undaunted. He kept a secret diary, writing between the lines of his Bible in minute, almost-invisible pencil. Denis Goldberg, sentenced to life imprisonment at the Rivonia trial, remembers: “He sang beautifully in his baritone voice to entertain our prisoner group and was a great actor in our Christmas concerts, singing revolutionary songs with communist tenor Eli Weinberg. The red flag and the Internationale were as much part of his repertoire as liberal songs out of the US Christian movement. He really contributed to building our unity.”
 
I was then in exile in Britain leading the 1969-70 demonstrations to disrupt and stop whites-only Springbok rugby and cricket tours. There was a news blackout in prison, but a delighted Hugh heard about the campaign and that “bastard traitor” Peter Hain from his furious warders.
 
Following his release in 1971, Hugh left South Africa for London on a one-way exit permit and immediately started transforming his secret jail diary into the book Bandiet: Seven Years in a South African Prison, published in the UK in 1974. It was hailed as a classic in prison writing, containing a heart-wrenching poem Touch, about being tactile, which prison forbade.
 
The sequel, Bandiet – Out of Jail (2002), published in the UK and in South Africa only when it was safe to do so after apartheid had ended, won the 2003 Olive Schreiner prize. In its foreword, Archbishop Desmond Tutu wrote: “Hugh Lewin went through sheer hell and emerged, not devastated, not broken and not consumed with bitterness or a lust for revenge. He is endowed with ubuntu – the very essence of being human.”
 
Hugh was gentle and self-deprecating, and never sought the limelight. His jail-mate Paul Trewhela wrote: “He sought for no high office, and never trumpeted his name. He always did what he thought was right, no matter what the cost.”
 
Born to Anglican missionary parents, Michael, a priest, and Muriel, a nurse, in Lydenburg, Hugh initially wanted to be a priest – perhaps influenced by his boyhood mentor, Trevor Huddleston. But soon after his arrival at Rhodes University in Grahamstown, he became embroiled in student politics, together with fellow black students from neighbouring Fort Hare, and my aunt Josephine Stocks, an activist.
 
After graduating, he honed his journalistic skills at the Natal Witness, Drum magazine and the Golden City Post. Then, like my parents, his close friends Adelaine and Walter Hain, he became a member of the Liberal party of South Africa.
 
After his release from jail, Hugh spent 10 years in London, working at the Guardian and for the International Defence and Aid Fund and was active in the British Anti-Apartheid Movement. He also started writing his much-loved Jafta children’s books about a little boy growing up in an African village.
 
Less publicised was the key role he played in the publication of Steve Biko’s iconic I Write What I Like in 1978. Biko’s biographer Xolela Mangcu said: “Lewin was not one to go on the rooftops to shout about how he had contributed to the production of that seminal book, but those of us who were influenced by Biko’s ideas will be forever indebted to him.”
 
When Zimbabwe gained independence in 1980, Hugh moved to Harare with his then-wife, and former solicitor in prison, Pat Davidson, and their two small daughters. He felt it would be “closer to home”. There he trained a new generation of journalists, and co-founded Baobab Books for many emerging Zimbabwean writers who went on to achieve global success.
 
Following his return to South Africa in 1993, he headed the new Institute for the Advancement of Journalism, in Johannesburg, and served on the Truth and Reconciliation Commission.
 
In 2012 he won the Alan Paton award for Stones Against the Mirror (2011), a soul-searching, beautifully crafted masterpiece about friendship and betrayal in the liberation struggle.
 
In his final years, Hugh lived with Lewy body dementia, navigating this with typical courage, selflessly cared for by his partner of 30 years, the journalist Fiona Lloyd.
 
He is survived by Fiona, and by his daughters, Thandi and Tessa, from his marriage to Pat, which ended in divorce.
 
• Hugh Lewin, journalist and activist, born 3 December 1939; died 16 January 2019