Despite Soltan’s ordeal, some of his own relatives support Sisi. Like many families in Egypt today, they are starkly divided between support for Sisi’s military regime and for the deposed government of Mohamed Morsi. Soltan’s father, Salah, who was also taken into custody, was a member of the Muslim Brotherhood and served in Morsi’s government, although Soltan himself remained aloof from the party. “I was against the policies of Morsi, but I would’ve liked to have seen a referendum or early elections instead of a coup,” Soltan says.

“The regime is fostering an environment in their prisons that makes them a fertile ground for that kind of ideology to flourish,” Soltan says. “The brutality and the overwhelming loss of hope is creating a situation which fits [the Islamic State’s] narrative, and they’re using it to try and recruit people and spread their message.”

Soltan was released this year after a 400-day hunger strike in which he lost over 130 pounds and nearly died, saved only by the intervention of the American government on his behalf. Despite bending to pressure in his case, the Egyptian regime continues to hold as many as 41,000 political prisoners, recent Human Rights Watch estimates suggest. And Soltan worries that extremism is incubating in those facilities, where he witnessed and experienced torture. Today, he says that, through its oppressive practices, the Sisi government is effectively acting as a “recruiting agent” for extremist groups like the Islamic State.

FOR NEARLY TWO YEARS , Mohamed Soltan, a 26-year-old citizen of both Egypt and America, endured torture, deprivation, and cruelty while locked in the prisons of Egyptian military dictator Abdul Fattah al-Sisi. In 2013, he was among thousands arrested in a country-wide crackdown on civil society activists, journalists, and members of the deposed government following Sisi’s coup and massacre of protestors in Cairo’s Raba’a Adawiya Square.

Soltan spent most of his life in the United States and moved back to Egypt near the beginning of 2013 after his mother was diagnosed with cancer. “Over the course of my life I’d gotten used to the American idea of having elections for pretty much everything — sheriffs, school board trustees, judges — so the idea of not even having an elected president was crazy to me.”

On August 14, 2013, the military used deadly force to clear thousands of protestors who had encamped in Cairo’s Raba’a Square in protest against the new regime. At least 800 people were killed and thousands more wounded, including Soltan, who was among a group of media activists and journalists who had been broadcasting the event on social media. In the course of the deadliest massacre in modern Egyptian history, Soltan was shot in the arm by a government sniper. Weeks later, while still recovering from surgery, he was arrested at his family home in Cairo, as the new government pushed a nationwide arrest campaign against its opponents.

Once in government custody, Soltan got firsthand experience with the brutality of the new regime. Despite his broken arm, he was given a “welcoming party” by his captors upon arriving in prison: He and several other new prisoners were stripped to their underwear then forced to repeatedly run through two rows of guards who beat them with batons, whips and fists. “They deliberately beat me on my broken arm for more two hours,” Soltan said, adding that his captors would periodically stop to pray in between torture sessions.

For the next two years Soltan would be shuttled around various prison facilities. While in jail, Soltan says he witnessed the recruitment efforts of Islamic State members. “There were people from across the spectrum of Egyptian society in jail: liberals, Muslim Brotherhood members, leftists, Salafis, and some people who had pledged allegiance to ISIS,” Soltan says. “Everyone felt depressed and betrayed, except for the ISIS guys. They walked around with this victorious air and had this patronizing and condescending attitude towards everyone else.”

Among the facilities in which Soltan was incarcerated was the notorious Tora Prison, where he was kept in an underground dungeon with dozens of other prisoners. Between regular beatings, humiliation, and torture by guards, the prisoners would talk to one another. In this grim environment, ISIS members would attempt to convince others of the justice of their cause. “The ISIS guys would come and tell everyone these nonviolent means don’t work, that Western countries only care about power and the Egyptian regime only understands force,” Soltan says. “They would say that the world didn’t respect you enough to think you deserve democracy, and now the man who killed your friends is shaking hands with international leaders who are all arming and funding his regime.”

While the other political factions represented in Egypt’s jails grappled with a seemingly hopeless situation, Islamic State members were filled with hope and optimism, citing a steady stream of “good news” about their state-building project in Iraq, Syria and Egypt’s Sinai Peninsula, Soltan says.

When the prisoners would discuss their circumstances, even avowed leftists found themselves unable to rebut Islamic State members’ arguments. “They would make very simple arguments telling us that the world doesn’t care about values and only understands violence,” says Soltan. “Because of the gravity of the situation they were all in, by the time the ISIS guys were finished speaking, everyone, the liberals, the Brotherhood people, would be left completely speechless. When you’re in that type of situation and don’t have many options left, for some people these kinds of ideas start to make sense.”

Among the prisoners, Soltan remembers a man named “Ashraf,” who had been accused of jihadi sympathies, and whom the guards had singled out for especially brutal treatment. “Out of sympathy and a sense of humanity, my father and I, along with other prisoners, would pool together extra food and clothing and share it with him,” Soltan recalls. “One day, he told us that during the whole time he had been in jail, my father and me had treated him with the most kindness of anyone, but he didn’t want our gifts anymore. He said that he didn’t want to get too attached to us because once ‘his people’ came to Egypt he wasn’t going to be able to protect Muslims like us from what would happen.”

While many prisoners succumbed to despair and in some cases radicalization at the hands of ISIS recruiters, Soltan said he found solace and a sense of defiance in his hunger strike. As his health began to deteriorate over months of refusing food, his jailers would begin to taunt him, even leaving razor blades in his cell and daring him to commit suicide. At one point they brought a dying man into his cell, making Soltan watch as he slowly expired on the ground next to him.

Soltan says that during his captivity guards would also periodically allow ISIS members to come into his cell and talk to him, in what he believes was an effort to radicalize him. “They would come into my cell and start telling me this nonviolent stuff like hunger striking doesn’t work,” Soltan says. They would “brag that Islamic State was growing and expanding, and that soon their people would be running Egypt too.”

“They were full of confidence,” Soltan says, “while everyone else in the prison felt desperate and hopeless about their future.”

Egypt’s prisons, notoriously brutal under the military regimes that have ruled the country throughout the post-colonial era, have in the past served as a breeding ground for radical movements. Sayyid Qutb, considered one of the intellectual founders of the modern jihadi movement, wrote his most incendiary works after being imprisoned and tortured by the regime of Gamal Abdel Nasser, which executed him in 1966. Al Qaeda leader Ayman al-Zawahiri also suffered extreme torture during the years he spent in Egyptian government prisons, an experience he would cite often in later years and as having had a formative effect on shaping his worldview.

Shadi Hamid, a senior fellow at the Brookings Institute and an expert on contemporary Islamist movements, says that the brutal suppression pursued by the Sisi regime in the name of fighting terrorism may ultimately empower radical groups like the Islamic State. “The number of people behind bars in Egypt is really unprecedented, these are not just a few thousand people. With the exception of the Assad regime [in Syria], this is the highest number of political prisoners in the Middle East that we know of,” Hamid says. “We know that imprisonment in such brutal circumstances often has a radicalizing effect, but it also represents a kind of networking opportunity, where people from diverse walks of life suddenly find themselves behind bars together.”

Although the Sisi regime claims to have stabilized the country through its repressive measures, Hamid says that its achievements are likely to prove illusory. “The whole myth of authoritarian stability is very appealing to people, but these heavy-handed tactics that allow no room for political dissent are already backfiring.” Adding that “we are already seeing an increasingly sophisticated insurgency in the Sinai and escalating terrorist attacks like the downing of a Russian airliner,” Hamid says that the human rights abuses of the regime and deteriorating security situation are inextricably related. “As long as ISIS can point to the miserable state of Egypt’s democratic process, it becomes more difficult for others to rebut their message.”