Madrid

The documented history of the city dates back to the 9th century, although there is evidence of inhabiting the area as far back as the Stone Age.

An excerpt from the article 17 facts about Madrid
The Visigoth village, one of the factions of the Germanic Goth tribe, was discovered near today's city. The first settlement was built in the years 852 - 886 by order of the emir of Cordoba, Muhammad I. It was a citadel built on the steep left bank of the Manzanares River. The city remained under the influence of the Moors until 1085, when it was conquered by King Alfonso VI of León and Castile.