Madrid was born on a cliff above the Manzanares, and everything on this walk is built on that edge. In the ninth century an emir of Córdoba put a small walled fort on a bluff over the river, watching the valley crossing on the road between Toledo and Segovia. The fort became a royal castle, the Alcázar, which burned for three days from Christmas Eve 1734. The palace that replaced it stands on the same ground. This is not a walk through the palace's rooms (that is a separate, ticketed visit). It is a walk around the outside of the palace, all four sides of it, to see how one site shaped everything built there.
The wall that started it
The oldest piece is below the cathedral on the Cuesta de la Vega: a long stretch of rough wall with square towers, built in the second half of the ninth century under the emir Muhammad the First. The city calls Madrid the only European capital founded by Muslims. The wall is laid in blocks of flint and limestone round towers that stand out from the line, and it was strengthened in the tenth century by the caliph of Córdoba. It enclosed about four hectares on a rise above the river. The cliff did half the work of defense, the wall the rest. It has been a protected national monument since 1954.
A palace designed not to burn
Hear a stop from this walk
Mirador del Templo de Debod: The Edge Again
When the Alcázar burned in 1734, only some walls and one tower survived. Philip the Fifth first hired Filippo Juvarra, whose scheme was four times the size of what stands now, with twenty-three courtyards. Juvarra died, and his pupil fitted a smaller plan onto the narrow, sloping site, building from 1738.
Two design decisions follow from the site. The first is fire. The palace is vaulted in stone and brick throughout, with wood only in the doors and windows, so it could never burn the way the Alcázar did. The second is the slope. From the squares on top the palace shows six floors, but on the river side it has up to eight, because the architect let it step down the cliff. You only see this from below, from the Campo del Moro gardens, looking up the long lawn past the Fountain of the Shells. From there you see how the palace grips its hill.
The main front, on the Plaza de la Armería, sets gray granite against white limestone, with Francesco Sabatini's clock in the middle and a bell from the old Alcázar. Across the square, the Almudena Cathedral tells the opposite story: begun in 1883 as a Gothic church, redesigned after the Civil War because Gothic looked wrong beside the palace, and only finished in 1993.
The roof that was edited
Look at the palace roofline and it is plain. It was not meant to be. In the middle of the 1700s a series of statues of Spanish rulers was carved to stand along the top of the walls. Carlos the Third, the first king to live in the palace, wanted a plainer, more classical skyline and had them taken down. That single decision scattered the kings across the city: some now line the Plaza de Oriente at eye level, some stand around the long pond of the Sabatini Gardens, and thirteen went to the Retiro.
A garden that waited for a way down
The land at the foot of the cliff was bought by Philip the Second, but there was no practical way to connect it with the palace far above, and the Campo del Moro was laid out only in 1844, for Isabel the Second, with long straight avenues. In 1890 it was redesigned as a landscape garden. The cliff now holds something newer too: the Galería de las Colecciones Reales, the museum of the royal collections, opened in 2023 and built into the slope itself.
On the north side, the Sabatini Gardens replace royal stables that Sabatini built. The young republic decided in 1931 to pull them down for public gardens, and the design by Fernando García Mercadal, interrupted by war, opened in 1950: three gardens stepped down at different heights, with a long pond framed by kings from the old roof.
A temple on the next bluff
The walk ends on the next high point along the same edge, at the Temple of Debod. It was begun about 2,200 years ago in Nubia by the Meroitic king Adijalamani as a chapel to Amun and Isis, extended by the Ptolemies and decorated under Augustus and Tiberius. When Egypt's high dam at Aswan threatened to flood it, the Egyptian government gave it to Madrid in thanks for Spain's help, and it was rebuilt stone by stone and opened in 1972, still facing east to west as it did on the Nile. It stands where the Cuartel de la Montaña barracks stood, built in the 1860s, the scene of the military uprising of July 1936 in Madrid, and later demolished. The pond around it has been dry since 2018 while the city deals with leaks that were damaging the stone.
From the viewpoint beyond it you look out over the river valley and the Casa de Campo, the same high ground the emir chose.
Walking it
The walk is ten stops over nearly three kilometers and takes about seventy-five minutes, from Ópera Metro to the temple's viewpoint. It drops into the Campo del Moro and climbs out again, with two flights of steps near the end. The garden's far gate closes at six in the evening from October to March, so in winter start by four. You set the pace: no group, no fixed departure, and you can sit by the Shell Fountain as long as the view holds you.
The full route is Royal Palace and Temple of Debod: Madrid on the Edge; for the rooms inside, see the Royal Palace of Madrid guide. See all routes on the Madrid page.
Sources
- esMadrid, Templo de Debod: Adijalamani, Amun and Isis, the Ptolemaic and Roman additions, the Aswan dam, the gift to Madrid, the 1972 opening, the east to west orientation, the Cuartel de la Montaña.
- esMadrid, Madrid de los Austrias: the Alcázar destroyed by fire in 1734, the Bourbon palace that replaced it, and the Campo del Moro below the cornice.
- Patrimonio Nacional, Campo del Moro gardens: the gardens below the palace and their visiting hours.
Ready to experience it?

Royal Palace and Temple of Debod: Madrid on the Edge
75 min · 2.9 km · easy
More from Madrid
Explore more at your own pace.

Barrio de las Letras: Madrid's Writers' Quarter in Three Layers

Gran Vía: How Madrid's Great Way Grew Wider and Taller as It Was Cut

Malasaña and Chueca: Madrid's Old Northern Edge, Taken Back by the City

Edificio Carrión: The Curved Corner at Callao and the Sign That Stayed

Plaza de las Cortes: Cervantes, His Lion and the Congreso Lions

