Like Cadiz, the origins of San Fernando are lost in mythology – but in reality , archaeological finds reveal Punic, Roman and Arabic settlements and further reveal that these were not just desirable dwelling places for the well-to-do citizens of these nations, nut were centres of a thriving pottery-making industry, as is evidenced by the large number of kilns which have recently been unearthed. Nevertheless it is thought that the first urban settlements grew up around a Caulkers Yard, otherwise referred to as the one in the Place of the Bridge and a castle, that of San Romualdo, the ruins of which are presently undergoing restoration.
The accession of the Borbons to the Spanish throne and the fact that the Island passed into the bands of the Crown, together with the commercial growth of Cadiz, gave rise to some incipient military enclaves in the town. With the passage of time, these grew to become the first Spanish Maritime Department . This Department was located in San Fernando at that time known as the Isla de Leon thanks to its strategic position and the protection afforded by the intricate network of canals, tidelands and channels.
In 1766 San Fernando named its first mayor and the town became known as Villa de la Real Isla de Leon.
An event of great significance for the rest of the peninsula took place in the town, since it was the only part of free Spain not to be invited by the French. As a consequence, the General and Extraordinary Parliament assembled here from 24th September 1810 to 20th February 1811 when it moved to Cadiz. In recognition of its valiant performance during the Napoleonic invasion, the Parliament granted the town the title of City and also gave it a new name: San Fernando, in honour of King Fernando VII.