Historical accounts largely credit Riyadh's 18th-century ruler Daham bin Dawas al-Shalaan for being the first one to erect a wall around Riyadh in around 1740s. After expelling the
Ottoman-backed
Egyptian forces from
Najd and reinstating the
Second Saudi State in 1824,
Imam Turki al-Saud ordered the reconstruction of Daham's walls. However, after the victory of the
Rashidi dynasty in the
Battle of Mulayda against the
House of Saud in 1891, the new ruler of Najd
Ibn Rashid went on to desecrate and destroy much of al-Saud's structures, including the Riyadh wall. After
Ibn Saud deposed the
Rashidis in 1902 after the
Battle of Riyadh, he ordered the rehabilitation of the wall in order to safeguard the city from trespassers and invaders. In the 1950s, upon advice from then governor of Riyadh
Prince Sultan, King Abdulaziz ibn Saud ordered the demolition of the city walls to proceed with the city's modernization and expansion. In 1932, Ibn Saud established the Kingdom of Saudi Arabia and declared Riyadh to be the capital of the country. The walled town remained as the administrative center until 1944, when Ibn Saud shifted to
Murabba Palace and made it his new official workplace. ==Gates==