A four centuries-old mosque minaret has collapsed in Morocco, killing at least 41 people and injuring 71 worshippers, hospital officials and witnesses said.

Parliamentarian Dr Abdallah Bouanou confirmed the death toll.

"The number of dead reached at least 38," he said.

"I have this death toll from rescuers and doctors and officials at the hospital.

"I counted myself 13 dead. Their corpses were pulled out of the rubble by rescuers."

Local civil defence commander Alaoui Ismaili said the rescue operation was slow because of the narrow streets in the old city medina district where the collapsed mosque minaret is located.

"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."

The state news agency MAP, citing an official provisional toll, said 36 were killed and 71 more injured in the incident.

Khaled Rahmouni, whose home is hear the mosque, says the building collapsed as the imam (preacher) was beginning his sermon.

"About 300 worshippers gathered inside the mosque for the Friday afternoon mass prayers," he said.

"When the imam was about to start his sermon, the minaret went down."

The Lalla Khenata mosque minaret collapsed in the old Bab el Bardiyine neighbourhood of Meknes, which is about 140 kilometres southwest of Rabat.

Neglected old buildings in the old quarters of Morocco's cities collapse fairly often, but the fall of a minaret is rare.

- Reuters