The first wall in Madrid was built during the reign of Muhammad ibn Abd al-Rahman, between the years 850 and 866, and was reinforced and strengthened by the Caliph, Abd al-Rahman III, in the tenth century. The wall stones are made of flint and limestone, and are arranged around square towers equipped with cliffs, gates, and possibly ramparts. The Wall of Madrid at the time was one of the strongest and most fortified walls.