Joe Wilson, from Carfin, in Motherwell, collapsed in the early hours of last Thursday. He was rushed to Wishaw General Hospital where doctors put him in a chemically-induced coma in the hope that he would recover.
But the 17-year-old sixth year pupil, of Taylor High School, New Stevenston, Motherwell, who dreamed of working in medicine, died yesterday in the hospital's intensive care unit.
Staff and pupils at the school are said to be devastated at the news.
Hundreds of Joe's friends and family gathered at Carfin Grotto on Sunday night to pray at a vigil for the popular teen.
Joe was a selfless young man, offering his services as a volunteer at Wishaw General and also at St Andrew's Hospice in Airdrie. He also ran a tennis club for younger pupils.
His family – including dad Alan, mum Veronica and sister Angela – released a statement through the Motherwell Diocese of the Catholic Church.
It reads: "As a family, we are deeply shocked and saddened at the death of our wonderful and deeply loved son Joseph.
"Time seems to be standing still for us.
"We are deeply grateful for the prayers and thoughtfulness of so many friends in our community and parish and especially the teachers, pals and colleagues of Joseph at Taylor High School who have among other things been holding prayer vigils since Joseph became ill.
"Indeed, through the social media networks of Facebook and Twitter people from all over Britain have been sending kind messages of sympathy.
"As a family we have taken great comfort from the heartfelt messages from so many people – old and young as well as the kindness of strangers."
In the hours after he collapsed, Joe's friends set up the Twitter hashtag #prayforjoewilson which was re-tweeted thousands of times around the world.
Taylor High School's head teacher, Gerry McCormick, described him as an inspirational and brilliant pupil.
He had excelled in the classroom, winning the school prize for outstanding academic achievement in fifth year.
Mr McCormick said: "Throughout the last few days since the sudden onset of his illness, everyone has behaved with great dignity despite being so upset by the unexpected turn of events.
"Joe's career intention was to enter the caring profession of medicine, a vocation to which he would have been well suited.
"Joe was involved in parish life in St Francis Xavier Church in Carfin as a Reader and also as a helper with the Children's liturgy.
"Joe was an inspirational young man who touched the lives of everyone he came in contact with in the most positive way.
"While Joe's death leaves a huge void in the school and the wider community, his strength of character, determination and perseverance, allied to his academic brilliance, will be an outstanding legacy for the school for generations of pupils to come."