The Lalla Khenata mosque minaret collapsed in the old Bab el Bardiyine neighbourhood of Meknes, which is located about 140 km (80 miles) southwest of Rabat.
"About 300 worshippers gathered inside the mosque for the Friday afternoon mass prayers. When the imam (preacher) was about to start his sermon, the minaret went down," Khaled Rahmouni, a resident near the mosque.
However, there has been mixed report regarding the number of people affected in the incident.
According to other media reports, the number of worshippers who lost their lives in the incident have been reported as 40.
On the other hand, a news agency report, with reference to an official provisional toll, has announced the death toll as 36, while those injured have been confirmed as 71.
"The number of dead reached at least 38. I have this death toll from rescuers and doctors and officials at the hospital," parliamentarian and doctor Abdallah Bouanou said in a news agency report.
"I counted myself 13 dead. Their corpses were pulled out of the rubble by rescuers," he added.
The speed of the rescue operation is hampered by the narrow streets in the old city medina district where the collapsed mosque minaret is situated, local civil defence commander Alaoui Ismaili said.
"We are using only manpower, not equipment as we cannot bring heavy equipment through these streets," he said.
"We are moving with great cautiousness also because the walls of houses and shops adjacent to the mosque are fragile especially after the heavy rains of the past days," said Ismaili.
The collapsing of the minaret in old quarters of Morocco's cities has been considered as a very rare occurrence.