Miranda was a vital stronghold during Portugal’s first centuries of independence, and the Castilians had to be chucked out at least twice: in the early days by Dom João I, and again in 1710, during the War of the Spanish Succession. In 1545, perhaps as a snub to the increasingly powerful House of Bragança, a diocese was created here – hence the oversized cathedral.
During a siege by French and Spanish troops in 1762, the castle’s powder magazine exploded, pulverising most of the castle and killing some 400 people. Twenty years later, shattered Miranda lost its diocese to Bragança. No one paid much attention to Miranda again until the nearby dam was built on the Douro in the 1950s.