Analytical methods and numerical experiments are used to study salinization of groundwater in response to sea level rise. The system that is studied involves a saturated porous medium with an inclined upper surface. The upper surface is progressively inundated during sea level rise to simulate transgression, the landward migration of the shoreline. Four "modes" of seawater intrusion are distinguished: (1) horizontal intrusion for slow transgression and a relatively high-permeability (sand/silt) substrate, (2) vertical intrusion by seawater fingering for fast transgression and a sand/silt substrate, (3) vertical intrusion by diffusion for fast transgression and a low-permeability (clay) substrate, (4) vertical intrusion by combined diffusion and low-salinity fingering for fast transgression and a clay layer at the seafloor overlying an aquifer. These four modes are characterized by the development of very distinctive transition zones between the fresh and salt groundwater domains. An analytical expression is derived for the critical transgression rate which separates horizontal (mode 1) from dominantly vertical (modes 2-4) intrusion. For modes 3 and 4, salinization significantly lags behind sea level rise. The results are consistent with observations of fossil fresh/brackish groundwater beneath many continental shelves and shallow seas.