Tania Clarence, the mother accused of murdering her three disabled children, has been remanded to a secure hospital under the Mental Health Act.
The judge announced the decision after the hearing, in which Clarence, 42, spoke via video link from HMP Bronzefield, where she has been held until today.
Clarence appeared pale and distressed, according to eyewitnesses, and was dressed all in black. Her husband and father of their children, Gary, 43, sat in the public gallery just as he did when she appeared last week at for a preliminary hearing at Wimbledon Magistrate's Court.
Police were called to the south-west London home of the South African couple last Tuesday, where the bodies of three children were found.
Clarence was taken to hospital for treatment before being arrested on suspicion of murdering the couple's three younger children - four-year-old Olivia and three-year-old twins Ben and Max.
All three children were suffering from a severe and life-limiting condition called Spinal Muscular Atrophy. Only their eldest eight-year-old child does not have the condition. She was with her father in South Africa at the time of the incident.
Zoe Johnson, the prosecuting QC, told the court that the pathologist investigating the deaths of the three children, Dr Nathaniel Carey, had indicated that the cause of death was 'probably suffocation' but that further tests would be carried out.
Judge Brian Barker, who presided over today's bail hearing at the Old Bailey, denied Clarence bail but allowed her to be moved from prison to a secure hospital, which cannot be named.
"There is a combination of circumstances here that makes this an exceptional case and allows this court to take an exceptional course," Judge Barker explained as he announced his decision to remand Clarence to a secure hospital.
"It isn't bail, but what we are doing is ordering for her to be subject to a Section 35 Order under the Mental Health Act, so she can then be remanded effectively for review of her condition."
Section 35 allows a court to detain the accused to assess their mental health. Persons detained under Section 35 cannot be forcibly medicated but are not permitted to leave the hospital. The initial period of confinement is limited to four weeks, but this can be extended.
A plea and case management hearing will take place on July 15 at the Old Bailey.