Madrid’s first city wall was built during the Emirate of Muhammad ibn Abd al-Rahman, between the years 850 and 866, and it was reinforced in the 10th century by Caliph Abd al-Rahman III. The most substantial remains of the wall can be seen in Emir Mohamed I Park, in the vicinity of the Royal Palace.