The Merensky Reef (MR) in the Bushveld Complex has been variously interpreted as resulting from: magma mixing followed by gravitational settling of chromite and/or sulphide onto the magma chamber floor; upward percolation of interstitial fluids from the solidifying underlying cumulates; a pressure-induced burst of crystallization of sulphide and chromite; the emplacement of chromite- and sulphide-rich slurries from a staging chamber; a sill-like injection of magma rich in sulphur and platinum-group elements (PGE) into pre-existing cumulates; hydrodynamic sorting in mobilized unconsolidated cumulates containing disseminated ore minerals. We test these models against field relations in the MR in potholes, roughly circular depressions in which some of the footwall rocks are lacking. The most telling observations are: local transgressions of the MR by younger potholes; widespread magmatic erosion of the footwall to the MR; magmatic erosion of cumulates within the MR itself; evidence of nearly solid rocks a few metres below the footwall prior to crystallization of the MR; igneous layering in the MR that is concordant with the sloping sides of potholes; chromitite seams of the MR lining vertical to overhanging walls of potholes; mineralized dyke- and sill-like apophyses of the MR in the footwall a few metres below its normal position. None of the suggested models for the origin of the MR are consistent with all of these observations. We propose an alternative hypothesis that involves the following sequence of events: (1) a batch of new dense magma mixed with the resident melt as it entered the chamber and the resultant hybrids then spread out laterally along the floor as basal flows; (2) as a consequence of mixing, the hybrid magmas were superheated and caused intense thermochemical erosion of the footwall cumulates, resulting in igneous unconformities on various scales from dimples a few millimetres across to kilometre-sized regional potholes as well as dyke- and sill-like apophyses along weak surfaces in the footwall rocks; (3) on cooling of the hybrid magma, chromite crystals and droplets of sulphide melt formed in situ, draping the irregular erosional surfaces; (4) chromite and the sulphide melt effectively scavenged PGE from magma that was continuously brought to the base of the chamber by vigorous thermal or compositional convection. Multiple pulses of magma replenishment led to repetition of this sequence of events, resulting in a complex package of mineralized rocks. In situ crystallization of basal layers of magma may be a viable interpretation of PGE reefs in other layered mafic–ultramafic intrusions.