Understanding the molecular mechanism of adaptive evolution in plants provides insights into the selective forces driving adaptation, and the genetic basis of adaptive traits with agricultural value. The genomic resources available for Arabidopsis thaliana make it well suited to the rapid molecular dissection of adaptive processes. While numerous potentially adaptive loci have been identified in A. thaliana, the consequences of divergent selection and migration, both important aspects of the process of local adaptation, for A. thaliana are not well understood. Here, we use a multi-year field-based reciprocal transplant experiment to detect local populations of A. thaliana, composed of multiple small stands of plants (demes), that are locally adapted to the coast and adjacent inland habitats in north-eastern Spain. We identify fitness trade-offs between plants from these different habitats when grown together in inland and coastal common gardens, and also when grown under controlled conditions in soil excavated from coastal and inland sites. Plants from the coastal habitat also outperform those from inland when grown under high salinity, indicating local adaptation to soil salinity. Sodium can be toxic to plants, and we find its concentration to be elevated in soil and plants sampled at the coast. We conclude that the local adaptation we observe between adjacent coastal and inland populations is due to ongoing divergent selection driven by the differential salinity between coastal and inland soils.