The passenger train, full of Indian pilgrims, was traveling from the state capital, Lucknow, to a religious festival in the east of the country.
While the train was passing over the Saryu River, the pilgrims pulled the emergency stop handle in order to collect water necessary for the worship of the god Shiva.
However, as they were crossing the tracks, an express train, moving in the other direction, ploughed through them. A number of other pilgrims jumped from the bridge into the water below. To date, 12 bodies have been pulled out of the river, although the figure is expected to rise.
In Hinduism, one of Shiva's forms is the god of destruction, the bringer of death.
Pilgrims are often the victims of accidents in India. On August 9, at least 85 pilgrims were killed in a road crash in India's north-western state of Rajasthan when the truck they were riding in fell into a gorge. The pilgrims had been traveling to the shrine of a medieval Sufi saint.