The sulfate-rich sandstones of the Burns formation investigated by the Opportunity rover on Meridiani Planum, Mars, are directly underlain by the fine-grained sedimentary rocks of the Grasberg formation. It was recently shown that, except for differing amounts of MgO and SO3, the Burns and Grasberg rocks have nearly identical chemical compositions, suggesting both units are genetically related. Here, quantitative models demonstrate that the chemical composition of the Burns formation can be accurately reproduced by addition of MgO and SO3 to a Grasberg-like precursor, along with small amounts of Ni. Based on this result, a new scenario is proposed for the origin of the Burns formation: (1) deposition of fine-grained airfall deposits with composition similar to the Grasberg rocks; (2) induration of the deposits, resulting in materials that closely resemble the current Grasberg formation in composition and texture; (3) erosion into sand-sized particles, which are then reworked by eolian and fluvial processes to form the bedding features observed in the Burns rocks; (4) infiltration of the deposits by one or more generations of groundwater, resulting in diagenetic alteration that included local element redistribution, dissolution/recrystallization of minerals, cementation, and formation of hematite spherules; (5) evaporation of groundwater at some point during diagenesis enriched the Burns sediments in MgO and SO3, with greater amounts accumulated closer to the surface. This scenario fully accounts for the chemical composition of the Burns sandstones as well as their sedimentary and diagenetic features, while invoking only a known sediment source and sedimentary/diagenetic processes widely observed on Mars.