Greyness and solitude marked French ex-president Nicolas Sarkozy's three weeks in prison, according to excerpts released from an upcoming book.
He was handed a five-year sentence but was released with restrictions after serving 20 days, following an appeals court ruling that there was no flight risk.
He has written a 216-page book entitled "Diary of a Prisoner," which is due to come out on 10 December and excerpts of which were published in several French media this weekend.
"Grey dominated everything, devoured everything, covered every surface," he wrote in one passage.
"I would have given anything to be able to look out the window, to enjoy watching the cars go by."
During his first night, he knelt in prayer after watching a football match.
"It came naturally," he wrote.
"I stayed like that for several minutes. I prayed for the strength to bear the cross of this injustice."
Sarkozy, who was president from 2007 to 2012, was protected in prison by two security officers and remained confined to his cell 23 hours a day, except for visiting hours.
"It's often said that you learn at any age. That's true because I learned a great deal at La Sante prison, about others as well as about myself," he wrote.
His diet was made up of "dairy products, cereal bars, mineral water, apple juice, and a few sweet treats".
In an interview with Le Figaro, he said that he wrote most of the book while behind bars, writing "with a ballpoint pen on a small plywood table every day" and finished the book after his release on 10 November.
Sarkozy remains an influential figure on the political right despite the legal problems that have dogged him since leaving office.
Sarkozy has always maintained his innocence. An appeal trial is to get under way in March.
The former president has faced a series of legal challenges since leaving office.