A five-year-old boy with a rare form of cancer, who inspired Lewis Hamilton to victory in the Spanish Grand Prix, has died.

The reigning Formula One world champion was among a number of sports stars, including the cricketer Jos Buttler, former footballer Gary Lineker and grand slam tennis champion Novak Djokovic, to support fundraising by Harry Shaw.

Harry, who was diagnosed with Ewing’s sarcoma, a form of bone cancer, in August 2018, died on Saturday. He had recently moved back to his home in Redhill, Surrey, for his final days.

A post on a JustGiving page set up for the Royal Marsden Cancer charity said Harry took “his last breath after a tough 10-month battle”.

The youngster had “fought to the very end”, his family said. “His pain and suffering is over. It is impossible to imagine life without Harry and the hole he will leave in our lives. We are SO proud of Harry and everything he achieved in his life and the legacy he has created to help others. We miss him so much.”

The post on his fundraising page added: “Losing Harry means our happy family unit of four now becomes three. We lose our firstborn child; our two-year-old daughter Georgia loses her brother who she will probably never remember; and the wider family lose their first grandchild and nephew.

“We would like to say Harry died in peace and comfort; to an extent he did, dying at home in his own bed surrounded by his toys and the people he loved. But the actual truth is the last few weeks of Harry’s life were marked by terrible pain and suffering that no human, not least a five-year-old boy, should endure.”

Hamilton dedicated his win at last month’s Spanish Grand Prix to the child, describing him as his “spirit angel”, while Mercedes sent the trophy and one of its F1 cars to Harry’s home.

The Formula One driver had been alerted to his plight after he received a video message before the race in Barcelona.

He wrote in an Instagram post at the time: “You are such a strong boy, I wish I was as strong as you, I wanted the world to see how strong you are.”

Harry’s parents, Charlotte and James Shaw, set up the fundraising page after he was given just seven days to live on 29 April.