A mother who was "in denial" about her pregnancy and abandoned her newborn baby boy in a bin in toilets at a hospital has been spared jail.
The boy was found by a cleaner at the Royal Albert Edward Infirmary, Wigan, with his umbilical cord cut and tissues stuffed in his mouth.
Orsolya-Anamaria Balogh, 27, of no fixed address, admitted attempted infanticide.
She was given 12 months' community service by Liverpool Crown Court.
Judge Neil Flewitt QC also sentenced Balogh, who is Romanian, to 10 days' rehabilitation activity and ordered her to spend the next three months at a Leeds bail hostel.
The judge said there was considerable doubt over her claims that she had not known she was pregnant as it was discovered she had made internet searches about pregnancy and home births.
He told her two consultant psychiatrists agreed she was "in denial about being pregnant, disassociating from the whole experience, including at the time of giving birth."
He added Balogh's mind was "disturbed by reason of not having fully recovered from the effects of giving birth".
An earlier hearing heard Balogh went to the hospital's accident and emergency department at about 19:40 BST on 5 July last year with her partner complaining of abdominal pain, and told a triage nurse there was no possibility she could be pregnant.
She spent some time in the toilet but left before the nurse was ready to see her.
A cleaner noticed the bin felt heavy and heard muffled squeaking and opened it to discover the newborn was still in the foetal position.
Richard Pratt QC, prosecuting, told an earlier hearing: "The baby survived his ordeal with remarkable fortitude and, with medical intervention, was effectively unscathed by the circumstances of his birth."
The judge said the baby was in foster care and the subject of family court proceedings. The father intends to take his son to Romania and Balogh has had supervised contact with the child, which it is intended will continue.