Mohammed ben Abdallah
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 Chéraga guich tribe. Reign

Early reign 

Upon the accession of Mohammed, peace and stability were restored. Aware of the disastrous Black Guard, he restored the significance of the Arab guich. He also pacified the Berbers 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 left in ruins by the neighboring tribes. Restoration of authority 
In 1760, Mohammed witnessed a revolt by the Wadaya against his authority, who had supported his father. 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 Black Guard from power by ordering their transfer from Meknes to Tangier in the north. The Black Guard 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 Black Guard contingents to garrisons in Tangier, Larache, Rabat, Marrakesh and the Sous, 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 to import wheat, reduce taxes, and distribute food and funds to locals and tribal leaders in order to alleviate the suffering. By now, however, the improved authority of the sultan allowed the central government to weather these difficulties and crises. Mohammed was interested in scholarly pursuits and also cultivated a productive relationship with the ulama, or Muslim religious scholars, who supported some of his initiatives and reforms. Conflicts with the Europeans 

On 25 June 1765, a French fleet of 16 warships and several vessels arrived in front of Larache, however due to heavy seas and conditions, the attack was delayed until the next day. The next day, the French fleet bombarded Moroccan fortifications and batteries which could not retaliate. The bombardments continued throughout the next day, however by 28 June, several Moroccan vessels encircled the French fleet and inflicted heavy losses upon it, defeating the French expedition. The Moroccans only had casualties of 30 men, while the French had casualties of 200 killed, 49 captured, and 300 lost. In 1769, threatened by an invasion by Sidi Mohammed, the Portuguese governor of Mazagan received orders from Lisbon to immediately evacuate the city. The city was renamed al-Jadīda (الجديدة; "the new") soon after. The later sultan Abd al-Rahman (1822–1859) restored the city. He declared war on the Dutch republic, known as the Dutch–Moroccan War (1775–1777) but eventually lost due to a frustrating blockade imposed by the Dutch, and the loss of his best 2 ships. On 9 December 1774, Sidi Mohammed assembled an army of 30,000 to 40,000 men and powerful artillery and began a bombardment of Melilla. Spanish reinforcements disembarked in Melilla, and 117 new guns and mortars were installed. Part of the civilian population of Melilla was escorted on 16 December by a French ship which brought reinforcements from Iberia. With Britain's promise of subsidies, two Spanish squads blocked the Strait of Gibraltar to prevent any British support from aiding the Moroccan troops. In 1775, a British convoy carrying war material on the way to Melilla was intercepted and captured by the Spanish Navy. At the same time, the troops of the Ottoman Empire began to encroach on Morocco's eastern borders. Spanish troops resisted the attack over a period of 100 days, over which time some 12,000 projectiles were lobbed onto the city. Sherlock began to break the siege, a situation exacerbated by the desertion of Sidi Mohammed's Algerine mercenaries. The siege ended on 19 March with the Spaniards suffering casualties of 600 killed or wounded. With the Treaty of Aranjuez in 1780, Morocco recognised Spanish rule over Melilla, however Spain ceded territories to Morocco in return. Relations with the United States 
On 20 December 1777, Morocco became the first nation to recognize the United States of America as an independent nation. On the same day, the Dutch consol in Salé was instructed by the Sidi Mohammed to write letters on his behalf to the European merchants and consuls in Tangier, Salé, Larache, and al-Sawira, declaring that any vessel sailing under the American flag can freely enter Moroccan ports. Due to the continued delays of the American government in negotiating a treaty with Morocco, Sidi Mohammed issued the Moroccan seizure of the Betsey, and on 11 October 1784, the Moroccans captured the Philadelphia merchant ship Betsey after it left Cádiz on its way back to the United States. The ship and crew was captured and taken hostage to Tangier. Shortly after, the sultan announced that he did not confiscate the ship nor cargo, and that the ship, the cargo, and the men would be released once a treaty was concluded with the United States. The seizure of the ship led to the Americans having to take action and preparing for negotiations with Morocco. The Moroccan–American Treaty of Friendship, also known as the Treaty of Marrakesh, was signed on 28 June 1786. It was the first treaty signed between the United States and any Muslim, Arab, or African country. It was signed first by American diplomat Thomas Barclay and the sultan, then by Jefferson and Adams, and was ratified by the Congress of the Confederation in July 1787. The treaty has withstood transatlantic stresses and strains for more than 236 years, making it the longest unbroken treaty relationship in the history of the United States. Marriages, concubines and children 
Sidi Mohammed was polygamous and had a harem of slave concubines. His sons by marriage and by harem slave concubines ruled after him. His wedded wives were:

 Princess Lalla Fatima bint Suleiman, their wedding date is unknown, but they were married when he was still a prince. She was his cousin, and her father, Moulay Suleiman, is either a son of Moulay Ismail or a son of Moulay Rachid. Lalla Fatima was Sidi Mohammed's chief wedded wife, contemporary sources referred to her as Mulat Ud'Dar (The Lady of the House), she was held in high esteem by the people. Her children were Moulay Mohammed Ali the eldest of Sidi Mohammed's sons, Moulay Abdelmalik, Moulay El Mamoun (a.k.a. Maimun), Moulay Hisham - he was the father of Sultan Moulay Abd al-Rahman, Lalla Sofia, Lalla Lubabah - she married Sharif Surur in 1768, Lalla Sitt'al'Mulk and Moulay Abdeselam. Lalla Dawiya, born Marthe Franceschini, she was Scorcian or Geonese and former harem slave concubine of Sidi Mohammed whom he ended up marrying. Accounts differ about her narrative, some state that aged 7 when her family was freed by the Bey of Tunis, on their way home they were captured by Moroccans and re-sold to slavery. They entered the services of Sidi Mohammed and her family ended up being freed but she was kept as a slave concubine because she caught his attention. Another account state that with her mother, aboard a ship from Genoa to Sicily they shipwrecked on the cost of Morocco, they were kept the Sultan's captives and some induced Sidi Mohammed to order her to be forcibly taken from her mother. Despite her only being 8 years old she was kept as his slave concubine. In 1789 Lampriere records that she was Sidi Mohammed's favorite wife. Her son was Moulay Ibrahim. His other wives' full names are not recorded, only partially their family name by indicating from which tribe they hailed from. Sidi Mohammed's other wedded wives were:

 A Howariya lady of the Howara from the Sais, their wedding date in unknown. Her son was Moulay Abdelrahman. A lady of the Ahlaf tribe, their wedding date is unknown. Her sons were Moulay Hassan and Moulay Omar. A lady of the Elfeth family of Rabat, their wedding date is unknown. Her son was Moulay Abdelwahed. Another lady of the Ahlaf tribe, their wedding date is unknown. Her sons were Sultan Moulay Sulayman, Moulay Ettayeb and Moulay Moussa. A third lady of the Ahlaf tribe, their wedding date is unknown. Her sons were another Moulay Hassan and Moulay Abdelqader. A lady of the Beni Hsen tribe, their wedding date is unknown. Her son was Moulay Abdallah. Sultan Sidi Mohammed III had a harem of slave concubines, the ones recorded were:

 Elizabeth Marsh, she was an English slave captive who in 1756 was sold to his harem in the first years of his reign. She reportedly disliked him a lot and made her behavior dislikable to him so that it would fade his interest in her and make him free her. In the end Sidi Mohammed grudgingly granted her freedom and permission to leave the country. A Spanish slave captive, possibly renamed Lalla Sargetta she was the favorite of Sidi Mohammed. Her sons were Sultan Moulay Yazid and Moulay Moslama. Helen Gloag, the accounts of her biography and the fact that she ever set foot on Moroccan soil is doubted upon. However, her narrative was that she was a Scottish slave captive who in 1769 was bought in Algiers by a wealthy Moroccan who wanted to gift her to the Sultan to gain his favor. As his harem slave concubine she immediately caught Sidi Mohammed's attention and became his favorite. Sources even stipulate he ended up marrying her. They had two sons, who were assassinated by Moulay Yazid upon his ascension. But despite her narrative some doubt she really ever resided in Morocco as Dr Lempriere who was given permission to visit Sidi Mohammed's harem in 1789 recounted no presence of a Scottish slave concubine or wife named Helen. Construction 

The present city of Essaouira () was developed by Sidi Mohammed in 1769, with an estimated population of about 12,000. It was developed as the principal port for external trade to strengthen central authority to limit the intervention of Europeans. Rabat was also built to become an imperial city during Sidi Mohammed's reign, including the Dar al-Makhzen palace and the As-Sunna Mosque even though both have been much altered since then. The Lisbon earthquake of 1755 which destroyed most of Casablanca led to the Portuguese evacuating it. Sidi Mohammed rebuilt the town and renamed it al-Dār al-Bayḍāʼ (الدار البيضاء). Abdallah Laroui described him as "the architect of modern Morocco". Death 

Mohammed bin Abdallah died on 9 April 1790 in Meknes, and was buried in a small qubba near the Dar al-Makhzen of Rabat. He was succeeded by his son Yazid, who besieged Ceuta from 1790 to 1791. Yazid eventually died in 1792 and was succeeded by his brother Sulayman. See also
 Mohammed al-Duayf
 List of sultans of Morocco
 History of Morocco
 Moroccan–American Treaty of Friendship

Notes

References
 Morocco Alaoui dynasty
 History of Morocco

Bibliography
 
 
 
 
 
 
 
 
 
 

'Alawi dynasty
1710 births
1790 deaths
18th-century Arab people
Moroccan people of Arab descent
Sultans of Morocco
Royalty from Fez, Morocco
People from Marrakesh
18th-century Moroccan people
18th-century monarchs in Africa
'Alawi dynasty monarchs
City founders
Moroccan slave owners