The Masmak is a clay and mud-brick fort, with four watchtowers and thick walls, founded on stone blocks, lying in the center of Riyadh, in the old quarters. This building played a major part in the kingdom's history, as it was here that the recapture of Riyadh, led by Ibn Saud, occurred on 14 January 1902.
This building was built around 1865 by the prince of riyadh Abdulrahman ibn Sulaiman ibn Dabaan under the reign of Mohammed ibn Abdullah ibn Rasheed (1289–1315 AH), the ruler of Ha'il to the north, who had wrested control of the city from the rival clan of Al Saud. In January 1902 the young Amir Abdulaziz bin Abdul Rahman bin Faisal Al Saud, who was at the time living in exile in Kuwait succeeded in capturing the Masmak fortress from its Rashid garrison. The event, which restored Al Saud control over Riyadh, has acquired almost mythical status in the history of Saudi Arabia and has been retold many times, but has as its central theme the heroism and bravery of the future King Abdulaziz.
Among the companions of the Amir were Abdulaziz bin Musa'id bin Jiluwi, Abdallah bin Jiluwi, Abdulaziz bin Abdallah bin Turki, the Amir's brother Muhammad bin Abdul Rahman, Abdallah ibn Ibrahim ibn Abdallah Al Saud (nicknamed Snaitan), Fahd bin Ibrahim bin Abdul Muhsin Al Mushari and Nasir bin Farhan bin Saud Al Farhan. The building was situated in the commercial center of the old city of Riyadh. It was used by King Abdulaziz from 1902 to 1938 when he moved his court to then newly built Murabba Palace.