As it has for centuries, the Castillo de San Miguel dominates the Almunecar skyline. Originally built by Romans in the 1st century BC, the Moors developed the castle into an impressive fortress whose defences included three separately walled precincts, 46 towers and turrets and three main gates.
During the Middle Ages, particularly during latter reigns of the Nasrid kings in Granada, the castle was used by sultans as their beachside retreat and also as dungeons to house political prisoners.

In 1489, after 25 days of fighting, Moslem Almunecar capitulated to Christian forces. It was the last town to fall before Granada, three years later. At this time the castle became known by its current name, after the new patron saint, San Miguel. Remodelling began under Charles V, of which era came the main entrance of four towers, drawbridge (now gone) and dry moat.
For the next 300 years the castle continued to guard the town against threats from Berber pirates.

Its final action was seen in 1810 during the War of Independence. At this time Almunecar was occupied by Napoleon's troops and the fortifications were attacked from the sea by British warships causing enough damage to put the castle out of action.
After the French left in 1814, it fell into disuse. In the early 1980s the castle precincts were cleared and excavations and restorations were commenced.