The strategic importance of Cap Diamant was recognized by the French as early as 1608. Several defensive fortifications were built on the site by the French, and the British after their conquest of New France. The modern citadel was built from 1820 to 1850, in effort to secure Quebec City against a potential American attack. The British used the citadel until 1871, when they formally handed the property over to the Canadian government. Following the handover, the citadel was used as a military installation by the Canadian Armed Forces, and as an royal and viceregal residence.