A family were forced to lock themselves in the conservatory when their home was invaded by armed raiders.
Sonny McDougal, 23, and an accomplice, who has never been caught, stormed into the house at Hawthorne Avenue, South Shields, last August and demanded cash.
Newcastle Crown Court heard the son of the family, who McDougal knew from school, had a knife held to his neck by the unknown raider.
McDougal, who was armed with a wooden broom handle, ordered “give us your purse” during the terrifying ordeal.
Mark Guiliani, prosecuting, told the court: “The son of the homeowner was placed against the wall, the knife pointed at him and a demand for money was made.
“He managed to get away and they locked themselves in the conservatory.”
The family stayed barricaded in the conservatory as the raiders helped themselves to a mobile telephone and iPad.
McDougal, of no fixed address, was identified by the family but the second raider has never been identified.
The court heard McDougal has convictions for 38 previous offences, including violence and damage and he admitted aggravated burglary.
The court also heard McDougal has been diagnosed with paranoid schizophrenia, with psychotic symptoms.
Judge Deborah Sherwin ordered McDougal be detained indefinitely under the Mental Health Act.
The judge imposed a special restriction, which means McDougal will only be allowed back on the streets when the Home Secretary, under the advice of doctors, deems him to be safe.
Judge Sherwin told McDougal: “I think it necessary to protect the public from the serious risk of harm that can be caused by you.”