A son tried to kill his parents by poisoning an apple strudel with tranquillizers before he accidentally shot himself in the foot with a crossbow he was planning to kill them with.
Richard Hignett administered the powerful drug Alprazolam to a pastry in the family home in Wooton, Bedfordshire, on 10 March 2017.
The 32-year-old laced the strudel and his parents' hot drinks with a potentially lethal dose of the muscle relaxant, Luton Crown Court was told.
But his father had noticed a strange taste to his drink and poured most of it away while his mother drunk a larger dose.
The pair both went to bed early after feeling unusually tired and while they were sleeping, Hignett accidentally shot himself in his left foot with the crossbow.
His father then awoke the next day and found his son with an arrow lodged in his foot while trying to cut off his shoe to tend to his wounds.
Paramedics were called and Hignett was arrested and taken to hospital for treatment for his injured foot, before he was questioned and charged.
Hignett told police of his plans and he pleaded guilty to two counts of administering a substance with intent to commit an indictable offence, namely murder.
The court heard how Hignett, who was suffering with paranoid schizophrenia at the time, had planned to kill himself after murdering his parents.
For the crown Neil King, said: "In early February (2017) the defendant's mind turned and he was starting to search on the Internet 'how to murder someone quietly' and 'familial homicide.'"
The court was told that Hignett had bought the drugs from Portugal, reported BBC News.
Hignett was sentenced to an indefinite hospital order and will only be released when he is no longer deemed a risk to the public.
Judge Michael Kay QC said: "His parents have written to the court to say that they forgive him and that he had terrible mental problems."
Following the sentencing detective chief inspector Aaron Kiff of Bedfordshire Police said: "The hospital order received by Richard Hignett means he will remain in hospital until such time as the Secretary of State for Justice deems he is no longer a risk to the public.
"This was a particularly shocking incident to deal with, but I hope his time in hospital allows Hignett an opportunity to reflect on his actions, as well as the help that he needs."