The Walls del Arrabal (walls of the suburb) were the third in a set of five walls built around Madrid, now the capital of Spain. There are no remaining ruins of the Walls del Arrabal, leaving some debate as to their extent and the period of their construction. It is possible that the walls were built as early as the 12th century, however they were most likely constructed in 1438. The walls may have been intended to protect people against the plagues that ravaged the city at the time. The walls united the urbanized suburbs of the city and prevented entry of the infected.
The Walls del Arrabal were an expansion of the Christian Walls of Madrid built between the 11th and 12th centuries. They were followed by the Walls of Philip II, c.1566.
The urban nucleus of Madrid formed around a Muslim fort, and was protected by the Muslim Walls of Madrid (a.k.a. Arab Walls) built in the 9th century. Following the Reconquista, the fortifications were extended with the Christian Walls of Madrid (a.k.a. Medieval Walls) built between the 11th and 12th centuries to enclose new districts. The city continued to grow eastward, with the population increasing from 5,000 to 12,000 inhabitants from the mid-15th to early 16th century. Although Madrid was small, it was considered important among the Medieval Castilian cities, as it was one of seventeen voting places for courts, held there on occasion.
The suburbs, or arrabales, took their names from convents, hermitages and churches constructed outside the Muslim Walls in the 12th century. The first of these, known from 1126, was the arrabel de San Martin corresponding to the Convent of San Martin, followed by that of San Gines by the Church of San Ginés de Arles.
Some writers place the Walls del Arrabal's construction in the mid-12th century, under Henry IV of Castile. Urgorri dated it to the mid-12th century in Ensanche de Madrid en Tiempos de Juan II y Enrique IV. However, he left out the suburb of Santo Domingo and drew the walls as they existed in 1440, in times of John II of Castile. It may be that these constructions refer to some of the suburbs being fortified individually, as San Martin and Santo Domingo each had their own walls at some point. According to León Pinelo, a new wall was built to accommodate the Castilian and Leon knights who came with Alfonso VIII (r.1158–1214), the only suburb at that time being San Martin.