This is a population-genetic forward simulation program incorporating selection at multiple loci, arbitrary population structure and demography, and habitat specific fitness regimes. The acronym SLaM stands for "SLiM with local adaptation and migration", where SLiM is a program written by Philipp Messer and stands for "Selection on Linked Mutations". SLaM extends SLiM and is based on the source code of the latter.