History of Madrid
The documented history of Madrid dates to the 9th century, even though the area has been inhabited since the Stone Age. The primitive nucleus of Madrid, a walled military outpost in the left bank of the Manzanares, dates back to the second half of the 9th century, during the rule of the Emirate of Córdoba.