A fire has torn through at least 18 temporary tents at a massive Hindu festival thronged by millions of people in India.

No-one is believed to have been injured in the blaze in the northern city of Prayagraj.

Police said it was caused by the explosion of a gas cylinder but the flames were contained by firefighters.

Images from the sprawling tent city at the confluence of the Ganges and the Yamuna rivers show smoke billowing out as dozens of firefighters douse the blaze.

The Maha Kumbh festival, held every 12 years, started last Monday. Indian authorities say it is the world’s largest religious gathering.

Millions visit the area for the 45-day Maha Kumbh festival (Rajesh Kumar Singh/AP)

At least 77 million people are attending and authorities expect more than 400 million in total over the next six weeks.

Hindus believe that bathing at the confluence will cleanse them of their sins and release them from the cycle of rebirth.

To accommodate tens of thousands of holy men, pilgrims and tourists visiting the festival, authorities have built a sprawling tent city on the riverbanks.

It is equipped with 3,000 kitchens and 150,000 toilets and also has roads, electricity and water, communication towers and 11 hospitals.

About 50,000 security personnel are stationed in the city to maintain law and order and crowd management.