Sidi Mohammed ben Abdallah al-Khatib (), known as Mohammed III (), born in 1710 in Fes and died on 9 April 1790 in Meknes, was the Sultan of Morocco from 1757 to 1790 as a member of the 'Alawi dynasty. He was the governor of Marrakesh around 1750. He was also briefly sultan in 1748. He rebuilt many cities after the earthquake of 1755, including Mogador, Casablanca, and Rabat, and Abdallah Laroui described him as "the architect of modern Morocco." He also defeated the French in the Larache expedition in 1765 and expelled the Portuguese from Mazagan (al-Jadīda) in 1769. He is notable for having been the leader of one of the first nations to recognize American independence in his alliance with Luis de Unzaga 'le Conciliateur' through correspondence and Unzaga's secret intelligence service and led by his brothers-in-law Antonio and Matías de Gálvez from the Canary Islands. He was the son of Mawlay Abdallah bin Ismail and his wife a lady of the Cheraga tribe. Rule Early reign Upon the accession of Sidi Mohammed, peace and stability were restored. Aware of the disastrous 'Abid al-Bukhari, he restored the significance of the Arab guich. He also pacified the Berber tribes of the mountains who attacked the plains during the succession crisis, while the power of the 'Abid declined as they abandoned their military positions. Mashra' al-Raml, the former town built for the 'Abid, was pillaged and placed in ruins by the neighboring tribes. Restoration of authority In 1760, Sidi Mohammed witnessed a revolt by the Wadaya against his authority, who had supported his father. Sidi Mohammed then marched with an army to Fes where he defeated the Wadaya contingents and arrested their leaders. After this, the Wadaya were split up and were garrisoned in Meknes instead. Later in 1775, he tried to distance the 'Abid al-Bukhari from power by ordering their transfer from Meknes to Tangier in the north. The 'Abid resisted him and attempted to proclaim his son Yazid as sultan, but the latter soon changed his mind and was reconciled with his father. After, Sidi Mohammed dispersed the 'Abid contingents to garrisons in Tangier, Larache, Rabat, Marrakesh and the Sus, where they continued to cause trouble until 1782. These disturbances were compounded by drought and severe famine between 1776 and 1782 and an outbreak of plague between 1779 and 1780, which killed many Moroccans and forced the sultan