Children ran the distance between Wakefield and Rio De Janeiro in a 5,800-mile journey which raised more than £1,000 for charity.
Pupils at Wrenthorpe Primary School teamed up to cover the distance to the Brazilian city ahead of the Olympics being held there in August.
In a huge fundraising effort for MacMillian Cancer Support, youngsters ran every day for four weeks around the school before celebrating their arrival in Rio with a Brazilian-style carnival.
PE teacher Sally Mayman, who came up with the idea, said pupils learned about different places they would pass through on a journey to Rio.
She said: “They ran past London, where they learnt about British values and had a tea party for the Queen to celebrate her 90th Birthday.
“Then Spain, where we learnt about Spanish culture, tasted the food and learnt the language.
“Then they ran across the ocean and learnt about the different continents and oceans of the world.
“At the end they arrived in Brazil and learned about Brazilian football, basketball and volleyball.”
At the finale of the sponsored run pupils celebrated with music from their own samba band and a performance from the school’s street dance team.
Mrs Mayman said: “It culminated in a lap of honour.
“All the children made carnival masks and we had our own carnival with a Samba band. It was brilliant.”
Mrs Mayman said pupils ran different distances according to their age, with reception youngsters running half a mile a day over 16 days.
Pupils in years five and six ran a mile and a half a day and the total miles covered was added up each week.
They collected sponsorship for the run, so far raising more than £1,000 for the charity.
Representatives from MacMillan Cancer Support were at the finale of the youngsters’ journey around the world to Rio.
Mrs Mayman said: “After we finished a lot of children have been coming up to me saying, ‘When can we do the run again?’.
“They absolutely loved it. It was a really good atmosphere.
“It really brought the school together as one.
“And they have all got really fit from doing it.
“At the end some of the times they were taking to run it were unbelievable.”
The Rio 2016 Olympics will be held between August 5 and 21 in the Brazilian city.