NEW YORK (AP) — In a memoir released eight months after he died in prison, Russian opposition leader Alexei Navalny never loses faith that his cause is worth suffering for while also acknowledging he wished he could have written a very different book.

“There is a mishmash of bits and pieces, a traditional narrative followed by a prison diary,” Navalny writes in “Patriot,” which was published Tuesday, and is, indeed, a traditional narrative followed by a prison diary.

“I so much do not want my book to be yet another prison diary. Personally I find them interesting to read, but as a genre — enough is surely enough.”

The final 200 pages of Navalny’s 479-page book do, in some ways, have the characteristics of other prison diaries or of such classic Russian literature as Alexander Solzhenitsyn’s “One Day in the Life of Ivan Denisovich.” He tracks the boredom, isolation, exhaustion, suffering and absurdity of prison life, while working in asides about everything from 19th century French literature to Billie Eilish. But “Patriot” also reads as a testament to a famed dissident’s extraordinary battle against despair as the Russian authorities gradually increase their crackdown against him, and even shares advice on how to confront the worst and still not lose hope.

“The important thing is not to torment yourself with anger, hatred, fantasies of revenge, but to move instantly to acceptance. That can be hard,” he writes. “The process going on in your head is by no means straightforward, but if you find yourself in a bad situation, you should try this. It works, as long as you think everything through seriously.”

In recent years, Navalny had become an international symbol of resistance. A lawyer by training, he started out as an anti-corruption campaigner, but soon turned into a politician with aspirations for public office and eventually became the main challenger to Russia’s longtime president, Vladimir Putin.

Navalny’s widow, Yulia Navalnaya, oversaw the book’s completion. In a promotional interview for “Patriot,” she told the BBC that she would run for president if she ever returned to Russia -– an unlikely move with Putin in power, Navalnaya acknowledged. She has been arrested in absentia in Russia on charges of involvement with an extremist group. Putin “needs to be in a Russian prison, to feel everything what not just my husband, but all the prisoners in Russia” feel, Navalnaya said during an interview on CBS’ “60 Minutes.”

Navalnaya has vowed to continue her late husband’s fight. She has recorded regular video addresses to her supporters and has been meeting with Western leaders and top officials, advocating for Russians who oppose Putin and his war in Ukraine. She had two children with her husband, who in his book writes of his immediate attraction to her and their enduring bond, praising Navalnaya as a soulmate who “could discuss the most difficult matters with me without a lot of drama and hand-wringing.”

During the first section of his book, Navalny reflects on the fall of the Soviet Union, his disenchantment with 1990s Russian leader Boris Yeltsin, his early crusades against corruption, his entry into public life, and his discovery that he did not need to look far for a politician “who would undertake all sorts of needed, interesting projects and cooperate directly with the Russian people.”

“I wanted and waited, and one day I realized I could be that person myself,” he wrote.

His vision of a “beautiful Russia of the future,” where leaders are freely and fairly elected, official corruption is tamed, and democratic institutions work -– as well as his strong charisma and sardonic humor -– earned him widespread support across the country’s 11 time zones. He had young, energetic activists by his side — a team that resembled “a fancy startup” rather than a clandestine revolutionary operation, according to his memoir. “From the outside we looked like a bunch of Moscow hipsters,” he writes, and together they put out colorful, professionally produced videos exposing official corruption. Those garnered millions of views on YouTube and prompted mass rallies even as the authorities cracked down harder on dissent.