Riley Watson, 10, was just 60ft from the end of the 800m run when he collapsed with a stitch.
But classmate Julian Otu, also 10, came to his rescue - scooping him up and carrying him over the finish line.
Otu said: “I’d rather not have won and helped my friend than leave him there.”
Photographer Jon Corken, who captured the scene, said it was reminiscent of the moment Alistair Brownlee helped his brother Jonathan over the line at the Triathlon World Series in Mexico, sacrificing his chance of winning.
The boys had been taking part in the North East Lincolnshire Schools Sports Partnership Primary Cross Country Race, an inter-schools cross country event at Weelsby Woods in Grimsby.
The boys’ proud headteacher, Amanda Turner, of Allerton Primary School in Immingham, said: “What Julian did encompasses how we want our children to be. He has exemplified his caring attitude. He is a very caring boy.
“He is one of our young leaders where he helps support younger children within the school with extra classes.
“I am proud to say we have a school full of Julians. They are all exemplary. I think it’s wonderful what Julian did so it’s so nice to hear something good.
“That’s our Julian for you.”