During the 12th century, the dreaded Saracen pirates arrived and conquered the town, looted the islands, all of which lead to a period of great insecurity.
In 1520 war broke out between French King Francis I and Holy Roman Emperor Charles V. Cannes became a corridor for marching armies, but the worst was yet to come with the great plague of 1579, which wiped out most of the town’s inhabitants.
Spanish troops arrived in 1635 and occupied the town for nearly two years, and they returned in 1707 during the War of Spanish Succession. Between these foreign occupations, the fortress on the islands of Lerins became a state prison and one of its most famous inmates was the Man in the Iron Mask, who stayed there for eleven years from 1687 onwards. There has been much speculation as to who this mystery prisoner was (some believe it was the twin of King Louis XIV), but to this day nobody knows.