CAIRO (AP) — In Yassin Mohammed’s sketches and paintings, he and other Egyptian prisoners are crammed into tiny cells, feet in each other’s faces and their few belongings hanging from the walls.

The cramped scenes, defined by bars and closed cell doors, capture the claustrophobic reality of Egypt’s prisons, where tens of thousands have been locked away, often for months or years without charge, in the heaviest crackdown on dissent in the country’s modern history.

“One day, all this pain will go away,” one watercolor proclaims.

Mohammed, who walked free last month after serving a two-year sentence for taking part in a protest, chronicled daily life in his cellblock in dozens of sketches and paintings, offering a rare and intimate look inside Egypt’s sprawling prison network.

He has been in and out of prison since 2013, when the military overthrew a freely elected but divisive Islamist president. Since then, thousands of Islamists have been jailed, as well as a number of secular, pro-democracy activists, some of whom played a key role in the 2011 uprising that toppled longtime autocrat Hosni Mubarak.

Under President Abdel-Fattah el-Sissi, who as defense minister led the 2013 military takeover, authorities view even mild dissent as a threat. Protests have been outlawed, hundreds of websites have been blocked, and vague laws criminalize the spreading of “false news.”

For most of the two years he was in prison, Mohammed shared a 6- by 15-meter (yard) cell with nearly 30 other inmates — Islamists, jihadis, liberal leftists and, he said, people who were simply at the wrong place at the wrong time.

Rights groups say abuse of political detainees is widespread in Egypt, but Mohammed says he wasn’t physically abused, other than occasionally being pushed or slapped by guards. He says the real torment came from the unending boredom and the total lack of privacy.

His only escape was through art.

He managed to paint in a corner of his cell where the guards could not see him. Fearing that the guards would destroy the art if they found it, he smuggled the paintings out.

One piece that landed him in trouble was an unflattering caricature of el-Sissi, which guards seized in a surprise raid on his cell. Prison authorities chose not to press charges, instead sending him to solitary confinement, a light punishment for a man who says he yearned for privacy so much he spent time in the toilet just to avoid the other inmates.

A self-portrait inspired by that experience shows him sitting in the corner of a gray and black cell, slumped in resignation as a solitary ray of sunlight shines through the barred window.

Others show rare signs of normality or even beauty. A depiction of a prison bathroom — including garbage pails used by the inmates to store water because of frequent outages — has signs on the wall reading: “Please, leave the bathroom as you would like to see it!”

A bouquet of brightly colored flowers hangs above the bathroom — a wedding anniversary gift from the wife of one of the inmates.

In another painting, cardboard boxes turned into flower planters hang from the iron bars above a corridor. Mohammed says the prisoners save the cardboard boxes that their families use to deliver food and gather soil from sacks of potatoes they get from the prison’s kitchen.

“Plants and flowers there are like life in the midst of death,” said Mohammed.

Mohammed periodically had possession of a cellular phone while in prison, enabling him to communicate with a close circle of friends on social media. In the posts — which he asked his friends not to share for fear of repercussions — he described his daily routine and chores, and the claustrophobia he depicted in the paintings.

“God, I pray to you every day when the call for the dawn prayers rings out so you will free all those that are unjustly jailed or to soften their plight, and to let me meet Tom Hanks,” one post said, reflecting his near-obsessive admiration for the Oscar-winning film star.

Since his release on Sept. 20, just a day short of his 24th birthday, he has been traveling across Cairo collecting the works he smuggled out. He would like to put on an exhibition of some 50 pieces, but Egypt’s few remaining art galleries are unlikely to display his work for fear of angering authorities.

Instead, he plans to display them in his apartment in downtown Cairo.

“I don’t want to go back to prison. It does not take much these days to be sent to prison,” he said. “So, I will silently listen, watch and observe, and when I feel like I want to express a political opinion, I will talk to myself while alone in the privacy of my room.”