A man on trial for allegedly murdering his two-year-old son has pleaded guilty to killing the toddler.
Lukasz Czapla is accused of murdering Julius Czapla at a flat in Muirhouse, Edinburgh, on November 20 or 21 2020.
It is claimed the 41-year-old repeatedly struck the child with a skewer, or similar item.
The murder charge states that he fired an air pistol multiple times and shot his son in the head.
He is also said to have placed a pillow over the boy's face and "asphyxiated" him, and "previously evinced malice and ill-will towards him".
At the High Court in Edinburgh on Wednesday, Iain McSporran QC, defending, said the accused has pleaded guilty to culpable homicide.
Before a 15-strong jury, Mr McSporran then called for a "special defence".
The plea, read out in court, said Czapla states that in relation to charge one - the alleged murder of his son - "the accused at the time of the death of his son was suffering from diminished responsibility such that he is entitled to be convicted of diminished responsibility rather than murder".
Lord Beckett, overseeing the case, told the jurors that diminished responsibility in this case would be applicable if they felt the accused was "suffering from a mental disorder to such a degree that his responsibility is diminished".
Lord Beckett added: "If on balance you thought it was more probable than not that he (the accused) was suffering from diminished responsibility at the time of the crime, that would diminish murder to culpable homicide."
The court heard that the accused faces a total of 10 charges, with the others including possession of drugs and separate accusations of drink- and dangerous driving, as well as having an air weapon.
The hearing continues.
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here.