The friends of a 15-year-old boy refused to leave his side when he collapsed and died while playing football at school.
Andrew MacKinnon tragically passed away shortly after 3pm on March 14, leaving his friends, family and the local community distraught.
He collapsed while playing football with some close pals at Forrester High School in Edinburgh and his friends rallied around him, Reverend Michael Mair said during the boy's funeral at St David's Broomhouse Parish Church in the Scottish capital yesterday.
Despite the efforts of emergency services, paramedics were unable to save the young footballer.
Mr Mair said Andrew was "loyal", "precious" and always supported his friends, who did the same when became fell ill at school, refusing to leave his side, reports Edinburgh Live.
During the funeral service, Mr Mair added: "To his friends he was fiercely loyal and hated injustice
"He was always willing to back them up and stand with them in whatever challenge lay before them.
"When Andrew collapsed, he had just finished playing a game of football with some close friends and it is testament to their friendship that they refused to leave his side.
"To the community at large, he was a lad with a cheeky smile, always with a football under his arm or by his feet and up to some kind of mischief, which was never with malice."
Mr Mair said Andrew was a passionate Hearts fan and a season ticket holder, adding: "It is a time of great sadness for all those who love him as they try to come to terms with his loss.
"Family, football, friends and his girlfriend were the most important things in Andrew's life, according to his mates.
"He enjoyed singing and dancing, he was precious and irreplaceable. Our hearts are broken this day.
"As we say farewell to Andrew, we will reflect on all that he has meant to us, all he means to God and all of the ways that he has impacted our lives."
After Andrew's death, his dad said: "He was a really popular wee boy and a massive Hearts fan.
"He had so many friends and just loved his friends, family and football.
"He really was such a lovely wee boy and really loved his football. He died doing the thing he loved most and we are all heartbroken."
Mr Mair said a GoFundMe online fundraising campaign for the family has raised more than £30,000 so far.
A book of remembrance has been opened to enable people to record their memories of Andrew and send messages of condolence to his family.