There is little trace in the historical and archaeological record of early human habitation in the municipality itself. There is, however, evidence of prehistoric human presence at several nearby locations, including Cabezo Gordo hill in Torre-Pacheco and the salty coastal lagoon, the Mar Menor. San Javier was prized for its climate in Roman Hispania, and for the Mar Menor, where a salt industry developed. Traces of Roman and Carthaginian presence remain. A major Roman road, the Via Augusta, passes through the area and there are several underwater sites where, among other artefacts, pots and amphorae have been found. In Al-Andalus, during Islamic rule in the Iberian Peninsula, while there was little Arab or Berber presence in the territory of the current municipality there is evidence of use of their fishing technology, known in Spanish as encañizada. Muslim presence is also attested in nearby Los Alcázares, where walls and cisterns from this period remain. When King Alfonso X of Castile conquered the taifa of Murcia, the coastal area was only sparsely occupied, by shepherds and fishermen. The Huerta de Murcia and Mar Menor regions were gradually repopulated between the 13th and 16th centuries. Some of the families obtaining property near the Mar Menor took their surnames from the local area: Lo de Tacón, Saavedra, Roda, Galtero y Aledo. New churches and chapels were built as new population centres developed. At the beginning of the 18th century, one of these small churches founded the hamlet of San Javier. By 1809, the population of the villages of San Javier, Roda and La Calavera was 428. During the three years of the Trienio Liberal, a number of town councils were established in the Huerta de Murcia and Mar Menor regions. One of these was in San Javier. When this period ended, the town council of San Javier was abolished and the area once again became a district of the municipality of Murcia. The San Javier town council was reinstated in 1836. Over the last 30 years of the 19th century, economic hardship and poverty in the municipality led inhabitants to migrate to find work as farmhands and miners, in La Unión in Murcia and Oran in Algeria. At the close of the 19th century the area had 3,770 inhabitants, of whom half were farmers and the remainder fishermen and artisans. Some families prospered despite local poverty, becoming wealthy through dealings in land. A new middle class of administrators of country estates, entrepreneurs, mine owners, moneylenders and farmers emerged. Settlement of the area known today as Santiago de la Ribera began in 1888. A Naval Flying School was founded in San Javier in 1932. In 1943, the San Javier General Air Force Academy was established, founding a new neighbourhood, Ciudad del Aire.
Administrative divisions
The administrative perimeter of the municipality includes the town and ten smaller villages. Of these, the last two in the list are located on the coast: