He was held for seven months before being brought before a military court in Alexandria and sentenced for Years imprisonment. He spent another seven or eight months in custody in Alexandria before being moved to the oases prisons where he stayed until the mass releases of 1964. It was in prison that he met and befriended the writers Sonallah Ibrahim and Kamal al-Qalash, with whom he co-authored his first book In 1956.