At least 27 people have been killed and dozens of others injured in a stampede during a Hindu religious bathing festival in southern India.

It happened in Andhra Pradesh state as tens of thousands of people pushed forward to bathe in the Godavari River on the first day of the Pushkaralu festival, said Arun Kumar, a state administrator.

The stampede was triggered by some pilgrims who were trying to retrieve their shoes, which had fallen off in the rush to the river bank, police said.

Mr Kumar said the incident, in the town of Rajahmundry, happened not long after the 12-day bathing festival started in the early hours.

Andhra Pradesh's chief minister, Chandrababu Naidu, said 27 people had died in the stampede.

Another 34 people were injured and taken to hospital, Mr Kumar said.

Festival participants believe a bath in the river can rid them of their sins, and many believe it is more auspicious to bathe on the festival's first day.

V Satyanarayana, a pilgrim who was at the site, said the stampede lasted nearly 20 minutes.

"It was a frightening situation, with women and children crying for help," he said. "The policemen on duty were helpless and it took more than an hour to bring the situation under control."

With the bodies of victims lying around, relatives wailed and cried for help.

Some pilgrims said ambulances took time to reach the site because the roads were overcrowded with people.

Officials said a small place like Rajahmundry could not cope with the rush of hundreds of thousands of people, and that the situation became almost unmanageable.

Thousands of pilgrims, riding in buses, trains and other vehicles, started reaching the pilgrimage centre two days ahead of the start of the festival.

"There is a false belief that taking a holy dip in the river on the first day of the festival will be more auspicious," said Swamy Swaroopanand, a Hindu holy man. "It's the same as taking dip on any other day."

Indian Prime Minister Narendra Modi expressed grief over the tragedy, tweeting that he was "deeply pained" by it.

Rajahmundry is 280 miles (450km) east of Hyderabad, the joint capital of Andhra Pradesh and newly created Telangana state.

About 24 million people are expected to take part in the festival at varying points along the Godavari River, which flows through the two states.

Deadly stampedes are fairly common during Indian religious festivals, where large crowds gather in small areas with few safety or crowd control measures.

In October 2013, a stampede in Madhya Pradesh state in central India killed more than 110 people, mostly women and children.