An Irish student who was arrested while on holiday in Egypt has been told he could be sentenced to death by the end of the month over a protest he attended in 2013.

Ibrahim Halawa, from Dublin, was 17 at the time of his arrest, and has detailed his horrific treatment at the hands of the Egyptian authorities in a letter handed to The Independent by the human rights charity Reprieve.

Mr Halawa is being tried as an adult alongside 493 other defendants and faces death by hanging if found guilty. He says that because of the shambolic nature of the mass trial, no one has been permitted to speak on his behalf in court and his lawyers have been showed no evidence against him.

Now 20 years old, Mr Halawa wrote in his letter that he has been beaten, abused and mentally tortured during his three years in jail.

Though he has yet to be found guilty of any crime, Mr Halawa has been housed alongside convicted criminals in a small cell that holds up to 40 people at a time. He describes how prisoners are punished by being made to watch fellow inmates being tortured, while the others have been “crucified” by guards.

Mr Halawa’s trial has been postponed repeatedly since the day he attended a pro-democracy protest in Cairo with his three older sisters.

But according to Reprieve, at a recent hearing the judge announced that both verdicts and sentences will be handed down on the 29 June, and that will be the end of proceedings.

The mass trial is one of several held in Egypt since 2013. Some trials have seen death sentences handed down in the hundreds, Reprieve said, and the policy of putting juvenile offenders on death row contravenes international law.

“Ibrahim Halawa has been subjected to nearly three years of horrific abuse,” said Maya Foa, director of the death penalty team at Reprieve.

“Arrested for attending a protest when he was a juvenile, he’s been tortured and put through a sham trial with hundreds of others.

“It’s deeply worrying that the court is now suggesting that death sentences could soon be handed down. The international community must urgently call on the Egyptian authorities to release Ibrahim, and the other innocent protesters held alongside him.”

In his letter, Mr Halawa wrote: “I never imagined I would go to prison being innocent. I never thought it was possible, even in third world countries. It feels devastating. I could never see my family again. I could never have kids and see them grow up.