Bodies are laid on the ground outside a hospital following a stampede at a temple in Kunda, India, on Thursday. ((Rajesh Kumar Singh/Associated Press))

A stampede broke out at a Hindu temple in northern India Thursday leaving at least 63 people dead and dozens more injured, officials said.

The stampede occurred when thousands of people crowded into the compound of a temple in Kunda, a town about 180 kilometres southeast of Lucknow, the capital of Uttar Pradesh state.

Thousands of people had gathered at the temple around noon to receive free clothes and food to mark the anniversary of the death of the wife of the religious leader, Kripalu Maharaj, said Brij Lal, a local police official.

As people jostled each other, a gate to the compound also fell, causing more injuries, he added.

Around 44 worshippers were injured in the crush of people at the temple which belongs to a popular local religious leader, a senior government official said.

By late afternoon police had cleared the compound and started the process of identifying the bodies, the official said.

Hundreds of people gathered at a nearby hospital for news of their family members.

Most of the victims were women and children.

Deadly stampedes are a relatively common occurrence at temples in India, where large crowds, sometimes hundreds of thousands of people, congregate in small areas lacking facilities to control big gatherings.

In 2008, more than 145 people died in a stampede at a remote Hindu temple at the foothills of the Himalayas.