The family of a prisoner who fell off a toilet seat in his prison cell has been given leave to seek legal aid for compensation in the courts.
John Richmond, 37, of Kilmarnock, died from a heroin overdose in August 2009.
However, before his death, he launched an action after falling from a toilet at Castle Huntly Prison while serving two years for firearms offences.
Mr Richmond's son Dylan is claiming £100,000 compensation for his father's fall, which happened in March 2004.
Mr Richmond initially brought the case against the Scottish Prison Service (SPS) for loss of potential earnings.
Perth Sheriff Court was told that Mr Richmond's son was the executor of his estate and was trying to get the legal aid board to fight the claim.
He was given a month to pursue funding for the case.
The court heard that on 17 March 2004, Mr Richmond was in a disabled cell at Castle Huntly, near Dundee, when he toppled over as he stood up when a support rail came away in his hand.
The claim said: "He was using the grab bars at the time when, without warning, the grab bar gave way from the wall, causing him to fall and strike his back, neck and head.
"He was knocked unconscious and only regained consciousness in the ambulance on his way to Ninewells Hospital."
It added: "It was their [SPS] duty to take reasonable care for the safety of prisoners in their care and to avoid exposing them to unnecessary risk of injury.
"They ought to have known the equipment would be used by those going to the toilet and would require to be firmly attached to the wall."
Mr Richmond claimed he was left needing hospital treatment and was then unable to take up offers of well-paid employment as a lorry driver after leaving prison.
He claimed he had been left "permanently unfit for any employment" and had to turn down jobs which "would have earned him a substantial wage."
Mr Richmond's action is against both Scottish ministers, as operators of the prison, and East Kilbride-based AKP Scotland Ltd, which fitted the grab bar in the disabled cell.
Lawyers for Scottish ministers said: "Any failure to adequately secure the grab bar occurred as a result of failure on the part of AKP to fulfil their duty."
AKP claimed they were ordered to destroy all contracts with the prison service after the work was completed.