Twelve-year-old Hamish Mackinnon, who was otherwise in perfectly good health, defied the odds to survive after he collapsed suddenly in April last year.
He had suffered a cardiac arrest walking back to Stoneyhill Primary following a visit to Musselburgh Grammar School – where he is now a pupil – with his primary 7 classmates.
His mother Tina, 48, said: "We still don't know the reason why, there's no history of anything like this.
"Doctors are still doing genetic tests but it could be years before they identify what caused it because until they know what they are looking for, it's like looking for a needle in a haystack."
Hamish, who has been fitted with a defibrillator and given beta blockers, spent five days on a life support machine, five weeks in intensive care and a total of three months in the Royal Hospital for Sick Children following the cardiac arrest.
Yesterday, he met emergency call handler Morag Bell, 40, who has been praised with helping to save his life, at the official opening of the Scottish Ambulance Service's new 999 Emergency Medical Dispatch Centre in South Queensferry yesterday, which Health Secretary Nicola Sturgeon attended.
Hamish, who lives in Musselburgh, said he could not remember much about the drama.
"One of the parent helpers, Paul McLaren, did CPR on me and my teacher called the ambulance, and that's all I know," he said.
Mrs Mackinnon added: "The next thing he knew he woke up in intensive care five days later."
Hamish had complained of a headache to Mr McLaren, who caught him before he hit the pavement when he collapsed.
Ms Bell advised Mr Mackinnon as he performed cardiopulmonary resuscitation (CPR) on Hamish until the paramedics arrived.
Tina said: "I was down in England visiting my mum Barbara in Lincoln at the time and I was on my way to the station to get the train home when I got a phone call from the school to say Hamish had collapsed and had been taken to hospital in an ambulance.
"I didn't think it would be anything, I just thought he had fallen over or fainted.
"I phoned my husband and asked him to phone the Sick Kids hospital. The hospital said they didn't think he would live, and I should get to the hospital as soon as possible."
Tina, who has three other children, added: "It was just absolute terror, I thought we would either lose him or he would be brain-damaged. It took me six hours on the train to get to Waverley."
Ms Bell, who lives in Whitburn, said she could clearly remember the emergency call she received last April.
"When I answered the call for Hamish I thought it was just going to be that he had fainted," she said. "When I asked about his breathing the teacher said he was gasping, and that means something's not right. The call did get to me because my son Alistair is the same age as Hamish."
Although Hamish suffered a freak reaction to the drugs administered through his shinbone to resuscitate him, which meant he had to use a wheelchair for almost a year, and subsequently was on crutches, there has been no other damage caused by the cardiac arrest.
Mrs Mackinnon, who praised Ms Bell for helping to save her son's life, added: "It was a couple of weeks before we could relax, we had some pretty dodgy moments."
Ms Sturgeon said "a call handler doing their job extremely well had saved a child's life".
She added: "Without the quick-thinking and calmness of the call handler, that boy might not be here today."
Hamish's story will be shown on BBC1's Real Rescues this month.