The court heard that Whitson had not intended to run away
An inmate who was discovered outside the walls of an open prison claimed he had escaped from the jail by accident.
William Whitson, 34, said he had no intention of absconding from Castle Huntly, near Dundee, and was simply running away from another inmate.
He was shown mercy by a sheriff after the court heard he was still wandering around near the prison two hours later.
Whitson had an extra three months added to his sentence, compared to the usual eight months for absconders.
Perth Sheriff Court was told that Whitson had been slashed by a fellow inmate and had decided to run away to protect himself.
He admitted absconding from Castle Huntly on 6 February, while serving five years for assault and robbery.
Fiscal depute Stuart Richardson said: "They [police] got a report that a man had been seen walking along the dual carriageway towards Perth. They went out and discovered Whitson.
"He started to run away but was eventually caught. He was quite severely injured. Cuts to his head required 13 stitches."
Solicitor Graham Harding, defending, said: "There was an incident in which he was stabbed and he ran off to avoid further injuries.
"He was being chased by the people who assaulted him and he accepts that he left the prison grounds.
"He accepts, with the benefit of hindsight, that it might have been better to report the matter to the prison authorities."
He added that if his client had intended to abscond he could have done so quite easily as he was getting home visits.
Mr Harding confirmed that Whitson had lost the privilege of being in open conditions and would spend the remainder of his sentence in a closed jail.
Sheriff Fletcher said: "I take into account that the circumstances are different from the usual ones that I am faced with.
"The court does not approve of someone who leaves prison, but taking into account the fact the circumstances are different I think the appropriate sentence is three months."