The ruling came Tuesday in the case of Justin Somers, who had been charged with second-degree murder in the beating at the Edmonton Remand Centre.
Somers, who is 27, had been deemed in a psychiatric assessment as a possible risk to other people.
Court heard Somers was in a cell in May 2011 for breaching bail conditions when he attacked Barry Stewart.
The 60-year-old man had been arrested after failing to pay a fine for riding on public transit without paying the fare.
Somers' trial was told the accused stomped on Stewart's head 26 times before he was stopped by guards. (CHED)