Mars’ sedimentary rock record preserves information on geological (and potential astrobiological) processes that occurred on the planet billions of years ago. The Curiosity rover is exploring the lower reaches of Mount Sharp, in Gale crater on Mars. A traverse from Vera Rubin ridge to Glen Torridon has allowed Curiosity to examine a lateral transect of rock strata laid down in a martian lake ~3.5 billion years ago. We report spatial differences in the mineralogy of time-equivalent sedimentary rocks <400 meters apart. These differences indicate localized infiltration of silica-poor brines, generated during deposition of overlying magnesium sulfate–bearing strata. We propose that destabilization of silicate minerals driven by silica-poor brines (rarely observed on Earth) was widespread on ancient Mars, because sulfate deposits are globally distributed.