The incident occured at the Sunni Muslim Faizan-e-Medina centre in the southern port city of Karachi on Sunday afternoon.
As many as 70 others people were injured in the crush, hospital and police officials said.
Zahid Hussain, a Karachi police spokesman, said thousands of women were leaving for a rally after attending the gathering to mark the birthday of the Prophet Muhammad, which falls on Tuesday.
“A girl was coming out of the mosque … when she fell down, triggering a stampede,” Hussain added.
As she fell she had cried out, sparking the panic.
He said up to 50,000 people, mostly women and children had gathered for the ceremony.
A doctor at the state-run Jinnah Post-Graduate Medical Centre, said most of the deaths were caused by internal injuries and suffocation.
“Many of the victims are women and children,” Dr Simi Jamali said.
Survivors in hospital described how the scene quickly descended into chaos as participants at the ceremony struggled to reach safety.
“Women fell on each other as panic spread,” one woman said. “It was absolute mayhem. Nobody knew what had happened”.
Source: News Agencies