A dog owner fought back tears when a sheriff ordered his beloved pet to be destroyed.
Sheriff Colin Pettigrew said the case involving Diesel the German Shepherd was the most difficult he had dealt with in his 35-year career.
And he said it was "with a heavy heart" that he had to order Diesel to be put down as he'd attacked Michael Lauchlan in Erskine, Renfrewshire, in February this year.
But he opted not to ban Diesel's owner, Martin McShane, from being able to own pets, saying he considered him to be "a responsible dog owner."
McShane, 33, was due to go on trial over Diesel's attack on Lauchlan at Paisley Sheriff Court on Wednesday.
But he was admonished after pleading guilty to breaking the Dangerous Dogs Act by being the owner of Diesel, who was dangerously out of control when he attacked Lauchlan.
The court heard that McShane's wife Lisa was pregnant at the time of the attack, which took place on February 19 this year at their home in Erskine's Darroch Drive.
Sheriff Pettigrew was told that the family were looking to find another home for Diesel as they were due to have a newborn baby in the house.
And in their quest to find a suitable place for Diesel they were put in touch with Lauchlan, who is also from Erskine and is a manager and operator of RAF Police Military Working dogs.
Lauchlan headed to see Diesel to see if he would be a suitable animal to join the ranks at the RAF.
But when he entered the house Diesel began snarling and growling at Lauchlan before jumping on him and attacking him.
The court heard that Diesel grabbed on to Lauchlan's right hand and arm with his mouth and clamped his teeth down, maintaining a grip of him and leaving him injured and scarred for life.
Lauchlan was left with scarring to his right hand and arm because of the attack and spent several nights in hospital recovering from his injuries.
Due to the severity of the attack the police became involved and McShane was arrested and charged over the incident.
And, when he appeared in the dock, McShane admitted his guilt.
The day after the attack McShane took Diesel to try and get him put down but the vet he asked refused, saying he was not prepared to put a healthy dog down.
McShane had Diesel neutered instead and the court heard there had been no further incidents involving the animal in the 10 months since the attack.
But Sheriff Pettigrew, who became a solicitor in 1980 and was appointed as a sheriff in 2002, said he felt he had no option other than to have the dog destroyed.
He said: "The law compels me to order the destruction of the dog.
"It will be undertaken by a qualified veterinary surgeon, as directed by the Crown.
"You are required to deliver that dog to the surgeon within seven days."
The sheriff added that he was required to consider whether McShane should be banned from keeping dogs because of the charge he had pleaded guilty to.
But he said he felt there was no need, adding: "I consider you are really a responsible dog owner."
McShane fought back tears as he was told Diesel would be destroyed while his wife Lisa, who was sitting in the public gallery, sobbed loudly.