A man aged 83 has pleaded guilty to the manslaughter of another resident aged 92 at a Devon care home.
Peter Woodroof, 83, appeared by video link to admit killing Ivy Hawken at Hyne Town House in Strete near Dartmouth.
Sentencing at Plymouth Crown Court, the judge ordered that Woodroof be admitted to a secure hospital indefinitely.
Mrs Hawken was found to have died from asphyxiation on 16 December. Woodroof was arrested the next day.
The court heard that the retired dentist suffered from dementia and delusional fits.
He was found lying on top of Ms Hawken at the residential home and said he was trying to protect her.
Prosecuting, Sarah Munro QC told the court: "Woodroof told his son he believed he was killing his wife Audrey.
"He told a psychiatrist he was woken by a loud noise and went into the room opposite and thought his wife was singing and screaming.
"He said he pressed a pillow on her to stop her screaming. He said he was grief stricken but relieved when he realised it was not his wife."
Defending Woodroof, Robert Linford told the court: "When he is lucid the defendant expressed remorse, sorrow and understanding of what he did."
Judge Francis Gilbert said that the situation was "clearly a very sad case of a respectable man suffering in old age".
In a statement the Hyne Town House Care Home said: "The past six months has been a very difficult time for all concerned.
"We hope this judgement will bring closure and allow everyone caught up in this tragedy to move on with their lives."
Woodroof's wife Audrey, 82, died from a brain tumour while he was awaiting trial in Exeter Prison over the death of Ms Hawken.
Woodroof will remain in the St Magnus Clinic in Guildford indefinitely.