The Castelo dos Mouros — the Moorish Castle — is an 8th- to 9th-century hilltop fortress on the Sintra ridge, built under Umayyad rule to guard the western approaches to al-Ushbuna (the Arab name for Lisbon). Its 450 metres of battlements trace a narrow mountain crest at roughly 450 metres above sea level, looking across on one side to the Atlantic and on the other to the Tagus and the Lisbon plain.
The castle surrendered peacefully to Afonso Henriques, Portugal's first king, in 1147 — shortly after the Christian capture of Lisbon. Afonso granted a charter to thirty settlers in 1154. The castle lost military importance from the 15th century; the 1755 Lisbon earthquake left it partially ruined. In the 1840s King Ferdinand II began a Romantic-era restoration — consolidating the walls, restoring towers, reforesting the site — while he built Pena Palace on the adjacent peak. He treated the castle as a Romantic ruin to be seen from Pena, and the result is a deliberate visual pairing that shaped every subsequent image of Sintra.
UNESCO inscribed the Moorish Castle along with Pena, Sintra, Regaleira, and the surrounding mountains as the Cultural Landscape of Sintra in 1995 — the first European cultural landscape ever listed as a World Heritage Site. The monument today is managed by Parques de Sintra – Monte da Lua S.A., the state heritage company.