The British Empire’s East Africa Protectorate began in Kenya in 1895. Its oppressive rule lasted until the mid-1960s, when Jomo Kenyatta, the anti-colonial activist jailed in 1953 as part of the nationalist group the Kapenguria Six, was released from prison. Two years after his release, he became Kenya’s prime minister and, in 1964, its first president.

One could have been forgiven for hoping that his rule would be an improvement. But after his release, Kenyatta — as Kenyan author Ngugi wa Thiong’o describes it in his memoir “Wrestling With the Devil” — had a “political about-face.”

Kenyatta instituted a regime so harsh that his government incarcerated progressive intellectuals who “started to organize to oppose the plunder of the national wealth and heritage.”

Ngugi was one of those intellectuals. He was arrested at midnight on Dec. 30, 1977, when armed police officers came to his house. He was never officially charged with a crime, but the impetus for his arrest was his play “Ngaahika Ndeenda,” staged in Kamirithu but banned by authorities because it allegedly called for a class struggle.

The officers brought him to Kamiti Maximum Security Prison, where, for the next 12 months, he spent much of his time in his cell, sleeping on a mattress with sisal stuffing “folded into numerous lumps hard as stones” and writing what would become the novel “Devil on the Cross” on scraps of toilet paper.

“Wrestling With the Devil” is an edited version of “Detained: A Writer’s Prison Diary,” the memoir Ngugi wrote in 1982. He cut and reshaped portions of the original work to produce a slimmer volume that focuses less on the day-to-day injustices he experienced and more on Kenya’s history under imperialist rule and then under Kenyatta.

Ngugi tends to write in generalities, yet this volume still devastates with painful details of his time at Kamiti, from the smells of sweat and human waste that permeated the prison to the Kamiti superintendent who served political prisoners “food with bits of grass and sand thrown in.”

And he writes with a cutting wit, as when he states that the highest artistic achievements of white settlers were murals in a hotel bar that “still attract dozens of tourists who come to enjoy racist aesthetics in art.”

During Ngugi’s incarceration, another political prisoner, former parliament member Martin Shikuku, told Thiong’o never to lose faith. “That which is hidden under the bed will one day come to light,” Shikuku said.

“Wrestling With the Devil” is a powerful testament to the courage of Ngugi and his fellow prisoners and validation of the hope that an independent Kenya would eventually emerge.

Michael Magras is a member of the National Book Critics Circle. His work has appeared in the Houston Chronicle, Pittsburgh Post-Gazette and Newsday.

Wrestling With the Devil
By: Ngugi wa Thiong'o
Publisher: The New Press, 248 pages, $25.99.