Tom Moore, the second world war veteran who became the face of British civic solidarity during the Covid-19 pandemic, has died at the age of 100 after contracting the disease.

Moore raised £32.8m for charity during the UK’s first lockdown after pledging to walk 100 lengths of his garden to mark his birthday.

The online fundraiser had merely intended to raise £1,000 and restore his spirits following a broken hip and skin cancer. Yet it became a national focal point, attracting donations from more than 1.5m people and symbolising the public’s determination to withstand the pandemic.

Moore’s appeal drew on his status as a former army captain — he walked wearing his medals — and his unfailing optimism at a moment of national anxiety.

“Things will certainly get better. They’ve always got better. The last two wars that I’m talking about — we battled and we won. Today, with this battle with this unseen enemy, we shall win in the end,” he told the FT.

Known popularly as Captain Tom, he made an explicit link between the service of soldiers during the war and that of healthcare workers during the pandemic, saying: “I was one of the people out on the front. At the moment, the National Health Service are the people out on the front.”

As his fame spread, he extended his fundraising challenge to 200 laps of the garden. The 150,000 birthday cards he was sent by well-wishers on his 100th birthday in April forced the Post Office to make changes at the regional sorting office.

Moore was given a knighthood and made an honorary colonel in recognition of his efforts. He also had a chart-topping single, a version of “You’ll Never Walk Alone”, with Michael Ball and the NHS Voices of Care Choir.

The funding from the single and the charity walk went to NHS Charities Together, a group that funds mental health support for NHS workers among other services.

Born in West Yorkshire, Moore was conscripted into the army in 1940, aged 20. He served in India, modern-day Myanmar and Indonesia, and worked as a tank instructor on his return, before moving into business. He was a lover of motorcycles and cricket.

Following the death of his second wife Pamela in 2006, Moore had moved in with his daughter Hannah Ingram-Moore and her family. He was living with them when the pandemic hit.

Ms Ingram-Moore said that her father had been admitted to Bedford Hospital on Saturday after needing “additional help with his breathing”, but that he was not in intensive care.

Moore had travelled to Barbados in December, courtesy of British Airways, before travel restrictions had been tightened. He was not vaccinated against coronavirus, because he had been undergoing treatment for pneumonia.

Prime minister Boris Johnson said Moore was a “hero in the truest sense of the world.” Buckingham Palace said the royal family’s thoughts were with Moore’s family.