A pre-dawn stampede killed 18 people as tens of thousands of people gathered to mourn the death of a Muslim spiritual leader in Mumbai.

At least 50 other people were injured in the stampede early on Saturday when mourners thronged the home of Syedna Mohammed Burhanuddin, the head of the Dawoodi Bohra Muslim community

The crowd pressed against the gates of the house at the time, television channel CNN-IBN said, citing police.

Stampedes frequently happen at religious sites in India but they are not common in big cities such as Mumbai where there is often a greater police presence to monitor the flow of people.

The city's police commissioner, Satya Pal Singh, said the force did not expect so many mourners and his officers were badly outnumbered by the crowd.

"We didn't think the crowd would be so great," Singh said. "Also, it's an emotional occasion when police cannot take harsh measures to push back the crowd."

Some of those attending the event said there were no security arrangements outside the late leader's residence.

"[The] only thing I would like to say is, there were lot of people pouring in and there was not much of attention given from the side of government or the police," one witness told the Reuters news agency.

"They should have been here and they should have managed this."

Burhanuddin died on Friday and his body had been placed in his Malabar Hill home for people to pay their respects.

Stampedes are common at large funerals in India. Last October, about 115 people were killed in a stampede at a Hindu temple in the central state of Madhya Pradesh.