A 5-year-old boy with two prosthetic legs has raised more than £1 million ($1.7 million) for the hospital that saved his life when he was just weeks old, by walking a total of six miles (9.6 kilometres) over the past month.

Tony Hudgell lost both his legs after suffering abuse from his biological parents as a newborn, which left him on life support at a London children's hospital.

He set out to raise £500 for the same hospital by walking throughout June -- but smashed that target almost instantly, raising £1.1 million on his online fundraising page as of Wednesday.

Tony completed his walk on Tuesday in front of a sizable crowd in his hometown of West Malling, southeast England, and celebrated with his adoptive family.

"It is incredible to think that just a few weeks ago Tony could barely take a few steps. He is such a strong and determined boy and we are so proud," his mother, Paula Hudgell, told the PA Media news agency at the event.

Tony had only recently learned to walk on crutches but was inspired to complete the challenge after watching "Captain Tom" Moore, the 100-year-old war veteran who became a national celebrity after raising more than $40 million for Britain's National Health Service by doing 100 laps of his back garden, his JustGiving page says.

He had received support from a number of British celebrities, including the Duchess of Cambridge, former Prime Minister David Cameron and Chelsea footballer César Azpilicueta. He raised money for Evelina London Children's Hospital, a part of St. Thomas' Hospital in central London, which his parents described as his "second home."

"Paula has been giving us regular updates and we've been amazed at his progress," Caroline Gormley, Associate Director of Fundraising at the hospital, said in a statement.

"His strength and the generosity of everyone who has donated will make such an incredible difference. He has made everyone at Evelina London so proud."