It emerged from the city-state of Migrin around 1746 when Dahham ibn Dawwas built a wall and a mudbrick palace within it, and ruled as the settlement's chieftain until his overthrow by the First Saudi State in 1773.
Abdulaziz ibn Saud recaptured the town in 1902 and made it the base for his 30-year long unification wars that led to the establishment of Saudi Arabia in 1932.
The town served as the administrative center of the Saudi government before King Abdulaziz ibn Saud moved his workplace and residence to the Murabba Palace in 1944.
In 1950, he instructed the dismantling of the fortifications in order to expand the settlement into a metropolis and the walled town eventually ceased to exist.
The area covering the perimeters of the erstwhile town was renamed as the Qasr al-Hukm District in 1973 with the aim of preserving its historical and architectural significance.
[9][10] The town was later occupied by the Ottoman-backed Egyptian forces led by Muhammad Ali Pasha and Ibrahim Pasha when they launched a retaliatory offensive into Najd, pressing hard and subsequently laying siege to Diriyah and vanquishing the First Saudi State in the process in the aftermath of the Najd expedition and Wahhabi War of 1818.
In 1824, Turki bin Abdullah al-Saud regained control of Najd and shifted the royal family's center of power to the walled town, in the al-Hukm Palace as the infrastructure in Diriyah was razed to the ground.
Ibn Saud would go on to reclaim the territories of his ancestors, launching offensives into Hasa in 1913, Ḥa'il in 1921, Hejaz in 1924, and Yemen in 1934 as part of his unification campaigns and establishing several iterations of the Third Saudi State in the process.
Following the establishment of Saudi Arabia in 1932, Prince Muhammad bin Abdul Rahman al-Saud, the brother of Ibn Saud commissioned the Atiqah Palace, the first building constructed outside the city walls.
[19] Ibn Saud restored the Margab Fort in 1936 and also built the Thulaim Palace between 1936 and 1939, that served as one of the quarantine facilities for treating patients during the smallpox epidemic of the 1940s.
In 1943, the Red Palace was built for Saud bin Abdulaziz, the first structure erected using reinforced concrete in the history of Saudi Arabia and resulted in the direct development of the Fouta district.
[24][25] In the 1940s, several Kuwaiti merchants and traders set up an auction market just outside the northeastern fringes of the city walls, that later got evolved into the al-Batʼha commercial area.
As a result, several quarters and neighborhoods such as Duhairah and Dakhna were abandoned by its residents in pursuit of better opportunities in the north of the capital metropolis.
It is the de facto site where tribal leaders and members of the Saudi royal family pledge allegiance to the country's political leadership.
Once the administrative headquarters of the old city within the former walls, it was built by Daham bin Dawwas in 1747 and is the oldest structure in Riyadh that was razed and rebuilt on numerous occasions over the course of time.
[64][65] It was built on a farm owned by a farmer named Ibn Issa and was later incorporated into the capital metropolis of Riyadh following the dismantling of the city walls in 1950.
[106][107] The quarter contained the 18th century Dakhna Grand Mosque, due to which it was nicknamed as Hayy al-ʿUlamāʾ (Arabic: حي العلماء, lit.