Youngsters at Gorsemoor Primary School, in Cannock, received the news that year one pupil, six-year-old Jamie, had been diagnosed with Leukaemia, earlier this year.
As they were coming to terms with the news they were given a further blow when year six pupil, Ben aged 11, was diagnosed with a brain tumour.
In a bid to support their friends, both being treated at Birmingham Children's Hospital, they fundraised by collectively travelling 69,200 metres - the distance from the school to the hospital and back.
Everyone at the school, from staff, nursery children to year six pupils, pulled together to skip, side-step, conga, jump, dance and hop the distance.
In total the school have raised more than £5,000 for the hospital, and a further £4,000 for each of the boys' families to help support them through their ongoing treatment.
Nicki Costello, acting co-headteacher at Gorsemoor Primary School, said: “Every single person at our school has been affected by the upsetting news about Jamie and Ben’s diagnoses and we just felt compelled to do something to help the boys and their families.
“This awful situation has just shown how much our pupils care for one another, and we’re so proud of them, and the wider school community, who have come together to do their bit, despite their sadness and hurt.”
Miranda Williams, public fundraising manager at Birmingham Children’s Hospital Charity, said: “To have one sick pupil would have been a shock to the school, but two must have been absolutely devastating.
"But to turn their turmoil into action for Jamie, Ben and the children at our hospital, is so commendable, and will make such a difference in the support we can offer them here at Birmingham Children’s Hospital.”