King Mohammed of Morocco has ordered structural examinations of all the country's ancient mosques after a minaret collapsed, killing 41 people.
The centuries-old minaret fell as hundreds of worshippers were attending Friday prayers at a mosque in the central city of Meknes.
Rescue workers recovered the last body from the rubble on Saturday.
There has been public criticism of the apparent lack of maintenance of the minaret.
Following the urgent appraisal of old mosques ordered by King Mohammed, "the necessary measures will be taken", the interior ministry said in a statement on Saturday.
Earlier, the king had ordered the reconstruction of the Meknes minaret "keeping to its original form."
The government is investigating the cause of Friday's collapse. Meknes is on Unesco's world heritage list.