World leaders walked barefoot through puddles Sunday to pay their respects to revered Indian independence hero Mahatma Gandhi, after monsoon downpours dampened Prime Minister Narendra Modi's set-piece G20 programme.

Modi welcomed his guests to the site where the apostle of non-violence was cremated in January 1948, the day after he was gunned down by a Hindu nationalist ideologue.

US President Joe Biden was among several visiting heads of state to opt for felt slippers instead of going unshod at the site, where normal footwear is forbidden as a mark of respect.

Others including British Prime Minister Rishi Sunak and French President Emmanuel Macron joined Modi in shedding their socks and shoes on the walk to the marble plinth where an eternal flame commemorates Gandhi's memory.

After a rendition of a Hindu devotional hymn, they stood for a moment's silence before leaving wreaths to honour the peace icon.

Modi has regularly paid respect to Gandhi and spoken movingly about his ideals and legacy.

But the relationship between Modi's Hindu nationalist ruling party and one of the 20th century's most venerated figures remains deeply ambivalent.

The Raj Ghat memorial complex is one of the most hallowed spaces in the capital New Delhi, and more than a million people escorted Gandhi's body as it was transported there after his assassination.

In the decades since, it has hosted the funeral pyres of India's top statesmen and women.

Arriving leaders bowed before Modi as he hung shawls around their necks in front of a photograph of Sabarmati Ashram, a long-term residence of Gandhi's in the prime minister's home state of Gujarat.

The ashram is a popular spot on the itinerary of visiting world leaders, with Modi using it to host, among others, his former British counterpart Boris Johnson, and former US president Donald Trump and his wife and Melania.

- Hindu nationalist ideologue -

Gandhi's assassin Nathuram Godse, hanged for the killing the following year, has been championed by right-wing activists.

In their view, Gandhi failed to stop Britain's colony from being partitioned into the separate nations of India and Pakistan, thwarting it from becoming a state governed by ancient Hindu scriptures.

Modi has never explicitly denounced Godse or his ideology, and his government has championed the work of Vinayak Damodar Savarkar, an important Hindu ideologue who served as Godse's mentor.

The prime minister has a heavy personal investment in the success of this year's G20 summit, which he has used to burnish his image as an international statesman ahead of national elections next year.

Images of Modi have adorned billboards and bus stops around the country to tout the gathering of the world's top economies as a moment of national triumph.

The summit concludes Sunday with Biden flying on to a state visit in Vietnam.