From June last year, Dilip Trigunayak would stride out each morning to the banks of the Ganges and will the holy waters to recede. The clock was ticking. In six months, the floodplains where he stood would be the site of the largest human gathering in the world, probably ever.

“I would watch the water levels going up and down,” the bureaucrat says. “From then my anxiety started.”

More than 120 million Hindu devotees, as well as tourists, are expected to visit the north Indian city of Prayagraj over the next few weeks for the Kumbh Mela, a vast spiritual festival at the point where two sacred rivers, the Ganges and Yamuna, converge.

As the rivers have emptied of monsoon rain in recent months, Indian authorities have swung into action, reclaiming the riverbed and laying the skeleton for a temporary city that at 15 sq miles (39 sq km) is two-thirds the size of Manhattan.

The festival started on Tuesday morning when tens of thousands of Hindu ascetics charged – roaring, naked and ash-smeared – into the water, sanctifying it for the tens of millions of pilgrims who will follow in the coming days and weeks.

Praygraj is said to be one of four sites in India where drops of the essence of immortality were spilled from an urn being fought over by gods and demons. The festival moves between the four locations, with Prayagraj the largest and most lavish. Pilgrims travel from across the country and wait for days for their opportunity to bathe there for a few seconds, including at least 30 million people on the most auspicious day.

“People come here to taste the nectar of immortality,” says Sarabhang Giri, an Australian who was ordained a sadhu, or Hindu saint, in 2004.

With an election looming in India, more earthly matters are also under contemplation. For India’s Hindu nationalist government, the Kumbh’s message of unity across the religion’s castes and innumerable deities dovetails nicely with the ruling Bharatiya Janata party’s goal of consolidating Hindu votes.

Facebook Twitter Pinterest A thick layer of dust is seen over the tent city set up for the Kumbh Mela in Prayagraj, India, on Monday. Photograph: Rajesh Kumar Singh/AP

This is the first Kumbh Mela in Prayagraj since the city’s Mughal-era name of Allahabad was changed. No Kumbh Mela has ever been so well funded, or so heavily promoted in the media and on billboards, invariably alongside the face of Narendra Modi, India’s Hindu nationalist prime minister.

“In many recent Kumbhs there’s always been a political presence of some sort,” says Kama Maclean, an associate professor of south Asian history at the University of New South Wales. “For most people who go it’s a religious event. But from the 1930s people were going to the Kumbh Mela, bathing in the Ganga, and then going up [India’s first prime minister] Jawaharlal Nehru’s house and learning about nationalism.”

Pilgrims at the Unesco-listed festival will traverse a pop-up city of more than 185 miles (300km) of roads, nearly two-dozen pontoon bridges, a hospital, 40 police stations and 120,000 toilets. At night, the city is illuminated by more than 40,000 lights. Last Sunday a parade of Hindu ascetics on elephants and camels passed billboards advertising matrimonial websites and the Kumbh’s free wifi.

The core of the festival is the estimated 200,000 Hindu saints in attendance, many of whom emerge from seclusion in forests and mountains to take up residency in the tent city, where they perform prayers, administer blessings and lecture on Hindu scripture.

Many belong to one of the 13 major sects represented at the fair, first formed as militant defenders of Hindu temples, and who in the past have turned their fire on each other to determine who bathes in the holy river first.

“They have physically fought over the order,” says Giri. “Thousands of people have died in Kumbh Melas through history. Now they’ve worked out treaties saying this is the order in which we do it, and if there’s any change, there has to be big discussions.”

As well as keeping the peace between holy orders, organisers must work to ward off disease. Some epidemiologists and historians trace the first cholera pandemic of the 19th century to 1817’s Kumbh Mela, from where the infection spread via colonial British naval ships to rest of Asia, Europe and eventually the United States.

Facebook Twitter Pinterest A pilgrim prays at Sangam. The authorities will try to keep the waters flowing at an optimum speed. Photograph: Bernat Armangué/AP

Apart from building toilets, and deploying an army of more than 9,000 “night sweepers” to collect or treat waste, authorities try to keep the river flowing at an optimum speed of at least 200,000 litres a second: fast enough to avoid stagnation, but not too quick that it washes away bathers.

Stampedes are another constant threat. Thirty-six people where killed by a crush at a Prayagraj train station at the most recent event. In 1954, an elephant charged a dense crowd, killing more than 500 people.

Why the Kumbh Mela in Prayahraj is the festival to end all festivals Read more

The key to public safety is to keep the mammoth crowds moving, says Devesh Chaturvedi, the chief public servant who organised Prayagraj’s last Kumbh Mela in 2013. “Even if the water is 500 metres away, we have a system where the pilgrims can be moved for another three or four kilometres. People won’t worry about how much they have to walk. But after five or six hours of walking they should finally get their dip.”

One pilgrim, Devi Prasad, says he has walked hundreds of miles by foot from his village in Bihar state to bathe in the confluence of the Ganges and the Yamuna. A few more hours on foot is no trouble, the 63-year-old adds. “If you want to get close to God, you have to walk.”