The fortress of Mayrit (Madrid) was built somewhere between 860 and 880 AD, as a walled precinct where a military and religious community lived, and which constituted the foundation of the city. It soon became the most strategic fortress in defense of the city of Toledo above the fortresses of Talamanca and Qal'-at'-Abd-Al-Salam (Alcalá de Henares). In 1083 (or 1085) Alfonso VI took the city of Madrid in the context of his wider campaign to conquer Toledo. Alcalá de Henares fell in 1118 in a new period of Castilian annexation.
The fortress of Mayrit (Madrid) was built somewhere between 860 and 880 AD, as a walled precinct where a military and religious community lived and which constituted the foundation of the city. It soon became the most strategic fortress in defense of the city of Toledo above t,he fortresses of Talamanca and Qal'-at'-Abd-Al-Salam (Alcalá de Henares). In 1083 (or 1085) Alfonso VI took the city of Madrid in the context of his wider campaign to conquer Toledo. Alcalá de Henares fell in 1118 in a new period of Castilian annexation.