Author Michael Rosen has said doctors warned him he "might not wake up" shortly before putting him into an induced coma during Covid-19 treatment.
The We're Going On A Bear Hunt writer, 74, spent 47 days on a ventilator after being admitted to hospital in March.
He said doctors "handed me a piece of paper and said you've got a 50/50 chance", to which he asked "are you telling me I might not wake up?".
The ex-Children's Laureate said he was told "'Yes', then I signed something."
He recalled: "I think I was a bit light-headed but I remember thinking 'oh well a 50/50 chance'. I was quite sort of flippant to myself about it really."
Speaking on BBC Radio 4's Today programme, he said at first he thought he had the flu or a mild form of the disease.
He told presenter Mishal Husain that "things started moving very, very quickly" after his neighbour, a GP, tested the levels of oxygen in his blood and told him "you've got to go to A&E now".
He later found out his respiratory system, liver and kidneys were failing, and looking back said he was "probably two or three hours off departing this planet."
"I was so near to going," he said. "It's a reminder of how life is very impermanent."
Recalling the moment his wife told him how long he had been unconscious for, Rosen said "I got quite upset about it... That's full of emotion for me, that people were just hanging in there."
Image copyright Getty ImagesHis wife, radio producer Emma-Louise Williams, is now helping the author recover.
She used Twitter to update fans about her husband's illness, describing his time on a ventilator as a "long and difficult" seven weeks.
Recalling the night she was first told her husband may have to be put on a ventilator, she said: "My daughter and I came home and we didn't really sleep. We did think that Michael might go that night".
She said Rosen would spend another eight days breathing with the aid of a Continuous Positive Airway Pressure (CPAP) mask but was later readmitted to intensive care.
Rosen has been left with a temporary hole in his neck after doctors performed a tracheostomy to allow the ventilator to supply oxygen to his body via a tube.
He described himself as "feeble" and "lopsided" after losing some vision and hearing on his left side.
He likened his legs to "cardboard tubes full of porridge" and currently uses a hospital-issued walking aid which he has named "Sticky McStickstick".
In a specially recorded message for his young fans, he thanked them for their messages, and told them: "It does look a little bit as if this illness can be beaten with kindness and care form the NHS."
The author, who was Children's Laureate from 2007 to 2009, is best known for works including Little Rabbit Foo Foo and Tiny Little Fly.
His 2008 poem These Are The Hands was written to mark the 60th anniversary of the NHS. It is now part of a book that's being used to raise money for the health service.