From Mayrit to Habsburg Madrid: A Walk Through the City's Hidden Medieval Past
- Carmen
- 1 day ago
- 12 min read
Updated: 15 hours ago
Introduction
Madrid wasn't born a capital. It began as a small, almost unremarkable fortress, built on a bluff above the Manzanares River to watch over a contested frontier.
Underneath the baroque facades of Habsburg Madrid — that tangle of narrow streets between Plaza Mayor and the Almudena Cathedral — lies another city, far older: 9th-century Arab Mayrit.
This route connects two Madrids that are almost never told together: the Andalusi fortress of Mayrit, with its wall of flint and limestone, and the Madrid that Philip II turned in 1561 into the capital of an empire. Between the two lie seven hundred years of history you can walk through in a little over two hours.
You don't need much imagination to time-travel through this Madrid: you just need to know where to look. A street that sits noticeably lower than the ones around it, a brick tower poking above the rooftops, a stretch of city wall that suddenly appears at the bottom of a staircase.
This walk suits almost anyone with a couple of free hours in central Madrid: history buffs will find verified dates and sources at every stop, first-time visitors get an easy, self-guided route through the most atmospheric part of the old town, and photographers get some of the city's most textured stonework without the crowds of the Royal Palace or Plaza Mayor at peak hours.
Quick route overview
Stop | Era | Walking distance |
Cava Baja and Cava Alta | Christian city wall, 12th century | Suggested starting point |
Emir Mohamed I Park (Arab wall) | 9th century | — |
Plaza de la Villa (Torre de los Lujanes) | 15th century | ~15 min from the park |
San Nicolás de los Servitas | 12th century | <10 min from the square |
Plaza Mayor and old Alcázar (today the Royal Palace) | 1561–1619 | — |
Arco de Cuchilleros | Rebuilt in 1790 | Final stop |
Duration: 2 to 3 hours at an unhurried pace.
Area: the entire itinerary sits inside today's Centro district, between the Almudena Cathedral and Plaza Mayor.
Transport: no need to hop on public transport at any point.
Best time: early morning or a summer evening, when the light does the most justice to the golden stone of the wall and the reddish brick of the Habsburg-era facades.
Combine it with: if you walk it on a Sunday morning, the end of the route links naturally with El Rastro flea market.
Getting there and what to bring
Metro: Ópera, La Latina and Sol stations all sit a short walk from any stop on this route.
Footwear: comfortable shoes with good grip — there are cobbled and sloped stretches, especially around Cava Baja and Cava Alta.
Water: especially in summer, since much of the route runs through narrow streets with little shade.
Camera or phone with charge: the raking light of early morning or dusk brings out the texture of the Arab wall's stonework best.
Sun protection: several stretches, especially around Plaza Mayor and the Cavas, offer little shade at midday in summer.
Mayrit: The Arab Fortress That Gave Birth to Madrid (9th Century)
Madrid's name descends from Mayrit (sometimes transliterated Maŷrīṭ), a word that likely referred to the area's abundant underground water courses. Through the intermediate Mozarabic form Magerit, documented in medieval texts, the name evolved phonetically over centuries into today's "Madrid."
It was founded by the Umayyad emir Muhammad I of Córdoba between 856 and 865 CE, not as a city meant to grow, but as a frontier fortification within the so-called Middle March, the defensive line separating the Caliphate from the Christian kingdoms to the north.
The Arab chronicler al-Himyari described it as "a small city and a well-defended fortress," with a congregational mosque where the Friday sermon was delivered regularly.
The original walled settlement covered barely four hectares — an area a walker could cross today in a few minutes — and took the shape of an irregular quadrilateral. A promontory naturally protected by the escarpment down to the Manzanares and by several streams, including one that still runs underground beneath present-day Calle Segovia.
From this small alcázar, the Andalusi garrison controlled the passes through the Sierra de Guadarrama and watched the movements of Christian troops who, over the following centuries, would push south with ever-growing force.
Fun fact: when Toledo fell to Alfonso VI in 1085, Mayrit had already been in Christian hands for two years (since 1083). But the Mudéjar population — Muslims who remained in the city under their own legal status — went on living in the neighborhood around today's Calle Mayor and the Morería district for centuries. It was Mudéjar craftsmen who built much of Madrid's 12th- and 13th-century religious and civic architecture, including the tower at San Nicolás de los Servitas we'll see later.
Mayrit was never a great Islamic city on the scale of Toledo or Córdoba, and that's precisely why it's so hard to picture today: it left behind no grand monuments, only an urban layout. The crooked, narrow streets of today's Austrias district still largely follow the organic street pattern of that Arab almedina.
Cava Baja and Cava Alta: Walking the Old Moat of the City Wall
Few streets in Madrid reveal their medieval origin quite as literally as Cava Baja and Cava Alta, today the epicenter of Sunday tapas-hopping in La Latina.
The word "cava" isn't a wine reference at all — in old Castilian it meant precisely a defensive ditch or moat. These two streets follow, with remarkable fidelity, the path of the moat that ran alongside the 12th-century Christian city wall.
Walking Cava Baja today, past century-old bars like Casa Lucas or Txirimiri, is deceptive: the street looks completely flat, but it actually sits several meters below the level of Calle Toledo or Plaza de la Villa. That drop is still clearly noticeable if you climb any of the little side streets connecting Cava Baja to Calle Segovia: they're genuine ramps, and not by coincidence.
Cava Alta, its southward continuation, completes the run of that moat toward Puerta de Moros — literally "Gate of the Moors" — another place name that betrays the area's old defensive function.
Local tip: a useful reference point for taking in the drop is the junction of Cava Baja and Calle del Almendro, where the ground still visibly slopes toward what was once the bottom of the moat, while perpendicular alleys such as Calle del Nuncio or Costanilla de San Andrés climb steeply toward the original line of the wall.
If it's your first time in the area, it's worth deliberately walking both directions: once along the old moat, from Plaza del Humilladero to Puerta de Moros, and once perpendicular to it, climbing toward Calle Segovia. It's the most direct way to physically feel, in your legs, the defensive topography of medieval Madrid.
A short walk away, just outside the original walled perimeter, is where the Sunday flea market known today as El Rastro has set up since the 15th century — well worth combining with this route on a Sunday morning.
Emir Mohamed I Park: The Arab Wall You Can Still Touch
If there's one place in Madrid where the Islamic past stops being an abstraction and becomes tangible stone, it's Emir Mohamed I Park, next to Cuesta de la Vega and barely a minute's walk from the Almudena Cathedral.
Here survives the longest and best-documented stretch of the original Arab wall: roughly 120 meters long, about 2.6 meters thick, with sections still standing between 4 and 7 meters high, punctuated by several solid square towers.
The construction combines flint ashlar in the lower courses with rows of white limestone higher up, all bound with lime mortar, a 9th-century building technique. Historians document at least three gates in the original enclosure: Puerta de la Sagra, Puerta de la Almudena, and Puerta de la Vega, the most important of the three.
Fun fact: this stretch of wall stayed hidden and partly buried for centuries, until researchers Jaime Oliver Asín and Leopoldo Torres Balbás rediscovered and scientifically documented it in 1953 — a find that completely reshaped the academic understanding of the city's origins.
Since then, the section has been protected and displayed in the open air, set inside a quiet park that very few tourists — and not many madrileños either — visit on purpose. It's worth stopping to touch the stone: these are, quite literally, Madrid's original foundations, more than 1,150 years old.
A second fragment, about 70 meters long from the northwestern stretch of the wall, is now displayed across two rooms inside the Royal Collections Gallery, split apart because of damage sustained during the construction of the Almudena Cathedral.
Practical info: Emir Mohamed I Park
Location: Cuesta de la Vega, next to the Almudena Cathedral.
Price: free entry, no booking required.
Hours: open-air park, accessible during daylight hours.
Best time for photos: early morning, before the tour groups heading toward the Royal Palace pass through, when the low sunlight rakes across the stonework.
The Torre de los Lujanes and Plaza de la Villa: Medieval Civic Madrid
Barely a fifteen-minute walk from Emir Mohamed I Park, Plaza de la Villa packs three centuries of Madrid civic architecture into a tiny space.
The oldest surviving non-religious building in the city is the Torre de los Lujanes, from the 15th century: a Gothic-Mudéjar structure with a sober stone facade, crowned by a brick tower with pointed arches, that belonged to one of the most influential noble families of late medieval Madrid.
Fun fact: popular legend — with no solid documentary basis, but repeated for centuries — claims that King Francis I of France was briefly held prisoner in its dungeons after being captured at the Battle of Pavia in 1525, before being moved elsewhere.
Directly opposite, the Casa de Cisneros already speaks the language of the Spanish Renaissance: its Plateresque facade, commissioned in the 16th century, deliberately contrasts with the medieval austerity of the Torre de los Lujanes. Completing the ensemble is the Casa de la Villa, Madrid's former city hall, built in the 17th century to designs by Juan Gómez de Mora, the same architect responsible for much of Plaza Mayor.
Today the Casa and Torre de los Lujanes aren't open as a museum: the building is the seat of the Real Academia de Ciencias Morales y Políticas (Royal Academy of Moral and Political Sciences), so the usual thing is to admire its Gothic-Mudéjar facade from the square itself.
Practical info: Plaza de la Villa
Nearest metro: Ópera or La Latina, both a short walk away.
Access: the square itself is open at all hours; the historic buildings around it — including the Torre de los Lujanes — are viewed from the outside, since they house working institutions rather than museums.
What makes Plaza de la Villa special isn't just the quality of each individual building, but the fact that within a radius of barely fifty meters you can read, like an open book, the transition from medieval Madrid to the baroque Madrid of the Habsburgs.
The square also sits less than a five-minute walk from Puerta del Sol, Spain's kilometre zero, so it's easy to combine both stops within the same afternoon walk.
San Nicolás de los Servitas: The Oldest Mudéjar Tower in the Capital
Less than a ten-minute walk from Plaza de la Villa, tucked among newer buildings on a small square that's easy to walk right past, stands the church of San Nicolás de los Servitas — the oldest standing building in all of Madrid, city wall aside.
Its square tower, just over three and a half meters per side, is generally dated to the 12th century and built in brick with a stone ashlar base, following the Mudéjar technique.
Fun fact: historian Elías Tormo argued, backed by archaeological findings from 1927, that the tower may originally have served as the minaret of a mosque predating the city's Christian conquest. During restoration work, researchers discovered, hidden beneath later additions, a parapet and upper platform of the kind used so the muezzin could call the faithful to prayer. If the hypothesis is correct, it would be a remarkable case of continuity: the same building as a minaret first, then a Christian bell tower.
Above that base, three bands of blind arcading run around all four sides, with lobed arches on the lower levels and horseshoe arches higher up. Declared a National Monument in 1931, the tower narrowly escaped demolition in the early 19th century and survived thanks to successive rounds of protection.
Practical info: San Nicolás de los Servitas
Nearest metro: Ópera, about a five-minute walk away.
Viewing: the tower and exterior are visible from the small square at any time; access to the church interior follows its own opening and mass schedule, which is worth checking locally rather than assuming.
Photo tip: the surrounding buildings sit close to the tower, so a wide-angle shot or a few steps back into the adjoining street usually works better than trying to fit the whole tower from directly underneath.
1561: The Year Philip II Turned a Small Town into an Imperial Capital
For seven centuries, Madrid was a stronghold of modest military importance — never a capital. That changed overnight in 1561, when Philip II decided to permanently settle his itinerant royal Court in this Castilian town of barely twenty thousand inhabitants.
Historians don't fully agree on the exact reasons — its central position within the peninsula, an already usable royal alcázar, abundant hunting grounds nearby — but the result was immediate: within roughly a century, the population multiplied sevenfold to around one hundred fifty thousand.
The old Royal Alcázar, built precisely on the site of Mayrit's original fortress, became the official residence of the Spanish monarchy and the seed of today's Royal Palace, which would rise later after fire destroyed the original building in 1734.
Around the Alcázar, the new courtly capital grew rapidly. Plaza Mayor, built between 1617 and 1619, became the stage for every major public event of imperial Madrid. Institutions such as the Monasterio de las Descalzas Reales, founded by Juana de Austria between 1559 and 1564, cemented the city's new status as the spiritual and political center of an empire on which, as the saying went, the sun never set.
Fun fact: the capital title wasn't entirely unbroken. Between 1601 and 1606, Philip III briefly moved the Court to Valladolid, before returning it permanently to Madrid. The city has never lost its capital status since — a detail most conventional guidebooks skip over.
From the Arco de Cuchilleros to Today's Madrid
The final stop on this walk is also one of the city's most photographed spots, even if most people snapping the picture don't know why: the Arco de Cuchilleros, with its imposing stone staircase bridging the drop between Plaza Mayor and Cava de San Miguel.
This monumental entrance was built after the devastating fire of 1790, one of several the Plaza Mayor suffered over the centuries, which forced a partial reconstruction under architect Juan de Villanueva.
Walking down that staircase at dusk, as the taverns of Cava de San Miguel start filling up, sums up better than any explanation the journey we've traced here: from the modest frontier fortress of Mayrit to the monumental heart of an imperial capital.
Do it with a local guide: the best way to connect all these dots without getting lost in the side streets is to join the City Walking Tour through Madrid's most iconic landmarks, which covers much of this historic route. And if all that history works up an appetite, there's no better way to close out the afternoon than the Tapas Tour à la Quixote, a tapas crawl through the very same centuries-old taverns lining this medieval Madrid.
That, ultimately, is what sets this itinerary apart from Madrid's other historic routes: no tickets, no reservations, no opening hours, because almost everything worth seeing is out in the open, woven into the living fabric of a neighborhood still used for exactly what it was a thousand years ago — living, trading, and eating well.
In summary: 6 must-see stops
Cava Baja and Cava Alta — the path of the old 12th-century defensive moat, today La Latina's liveliest tapas street.
Emir Mohamed I Park — the longest and best-preserved stretch of original Arab wall in Madrid, from the 9th century.
Plaza de la Villa — the Torre de los Lujanes (15th century), the Casa de Cisneros and the Casa de la Villa, three centuries of architecture in fifty meters.
San Nicolás de los Servitas — the 12th-century Mudéjar tower that may once have been a mosque's minaret.
Plaza Mayor and the old Alcázar — the heart of the Madrid Philip II turned into an imperial capital in 1561.
Arco de Cuchilleros — the monumental staircase that closes the route, rebuilt after the fire of 1790.
Frequently asked questions
Do I need to buy tickets for this route? No. Every stop described — the wall at Emir Mohamed I Park, Cava Baja and Cava Alta, Plaza de la Villa, San Nicolás de los Servitas, and the Arco de Cuchilleros — is a free, open-air public space.
Do I need to use public transport? No. The whole route sits inside the Centro district, between the Almudena Cathedral and Plaza Mayor, and is done entirely on foot.
What's the best time of year to do it? It works year-round, though early morning or a summer evening are when the light best brings out the golden stone of the Arab wall and the reddish brick of the Habsburg-era facades.
Can I combine it with other plans in the area? Yes: if you do it on a Sunday morning, the final stretch near Cava Baja links naturally with El Rastro flea market, and finishing at the Arco de Cuchilleros puts you right next to the taverns of Cava de San Miguel for tapas.
Is this route suitable for a first visit to Madrid? Yes. Because it stays entirely within the Centro district and needs no transport, tickets, or advance planning, it works well as a first orientation walk before tackling bigger sights like the Royal Palace or the Prado — several of which sit only a short walk from stops along this same route.




Comments