Riyadh (; , "The Gardens") is the capital and largest city of Saudi Arabia. It is also the capital of Riyadh Province, and belongs to the historical regions of Najd and Al-Yamama. It is situated in the center of the Arabian Peninsula on a large plateau, and is home to 5,254,560 people, and the urban center of a region with a population of close to 7 million people. The city is divided into 15 municipal districts, managed by Riyadh Municipality headed by the mayor of Riyadh, and the Riyadh Development Authority, chaired by the Governor of Riyadh Province, Prince Sattam bin Abdulaziz. The current mayor of Riyadh is Abdullah Bin Abdul Rahman Al Mogbel, appointed in 2012. Riyadh has the largest all female university in the world, the Princess Nora bint Abdulrahman University. It has been designated as a Beta World City.
During the Pre-Islamic era the settlement at the site was called Hajr, and was reportedly founded by the tribe of Banu Hanifa. Hajr served as the capital of the province of Al Yamamah, whose governors were responsible for most of central and eastern Arabia during the Umayyad and Abbasid eras. Al-Yamamah broke away from the Abbasid Empire in 866 and the area fell under the rule of the Ukhaydhirites, who moved the capital from Hajr to nearby Al Kharj. The city then went into a long period of decline. In the 14th century, North African traveller Ibn Battuta wrote of his visit to Hajr, describing it as "the main city of Al-Yamamah, and its name is Hajr". Ibn Battuta goes on to describe it as a city of canals and trees with most of its inhabitants belonging to Bani Hanifa, and reports that he continued on with their leader to Mecca to perform the Hajj.
Later on, Hajr broke up into several separate settlements and estates. The most notable of these were Migrin (or Muqrin) and Mi'kal, though the name Hajr continued to appear in local folk poetry. The earliest known reference to the area by the name Riyadh comes from a 17th-century chronicler reporting on an event from the year 1590. In 1737, Deham ibn Dawwas, a refugee from neighboring Manfuha, took control of Riyadh. Ibn Dawwas built a single wall to encircle the various quarters of Riyadh, making them effectively a single town.
The three Saudi states
In 1744, Muhammad ibn Abdel Wahhab formed an alliance with Muhammad ibn Saud, the ruler of the nearby town of Diriyah. Ibn Saud then set out to conquer the surrounding region with the goal of bringing it under the rule of a single Islamic state. Ibn Dawwas of Riyadh led the most determined resistance, allied with forces from Al Kharj, Al Ahsa, and the Banu Yam clan of Najran.
However, Ibn Dawwas fled and Riyadh capitulated to the Saudis in 1774, ending long years of wars, and leading to the declaration of the First Saudi State.
The First Saudi State was destroyed by forces sent by Muhammad Ali of Egypt, acting on behalf of the Ottoman Empire. Ottoman forces razed the Saudi capital Diriyah in 1818. In 1823, Turki ibn Abdallah, the founder of the Second Saudi State, revived the state and chose Riyadh as the new capital. Internecine struggles between Turki's grandsons led to the fall of the Second Saudi State in 1891 at the hand of the rival Al Rashid clan, who ruled from the northern city of Ha'il. Riyadh itself fell under the rule of Al Rashid in 1865. The al-Masmak fort dates from that period.