A man has told a court he was attacked in the gym of Aberdeen's Craiginches Prison because he was Polish.
Daniel Kaizer, 28, told the High Court in Inverness: "I just did not understand why someone would want to kill me. I believe it was racial."
Keith Porter, 22, is on trial accused of attempting to murder Mr Kaizer in a racially-aggravated assault on 4 December last year.
He allegedly struck the Pole on the head with a metal bar.
Mr Kaizer told the third day of the trial he was "80% certain" that Mr Porter had carried out the attack.
Three co-accused deny assaulting another Polish inmate, Lukasz Rusek, on the same date at the prison gym by repeatedly punching him on the head to his injury.
The Crown claims the alleged attack by George Stewart, Matthew Greig and Sean Laurenson was also racially-aggravated.
The trial continues.