Three-quarters of the oceanic crust formed at fast-spreading ridges is composed of plutonic rocks whose mineral assemblages, textures and compositions record the history of melt transport and crystallization between the mantle and the sea floor. Despite the importance of these rocks, sampling them in situ is extremely challenging owing to the overlying dykes and lavas. This means that models for understanding the formation of the lower crust are based largely on geophysical studies and ancient analogues (ophiolites) that did not form at typical mid-ocean ridges. Here we describe cored intervals of primitive, modally layered gabbroic rocks from the lower plutonic crust formed at a fast-spreading ridge, sampled by the Integrated Ocean Drilling Program at the Hess Deep rift. Centimetre-scale, modally layered rocks, some of which have a strong layering-parallel foliation, confirm a long-held belief that such rocks are a key constituent of the lower oceanic crust formed at fast-spreading ridges. Geochemical analysis of these primitive lower plutonic rocks--in combination with previous geochemical data for shallow-level plutonic rocks, sheeted dykes and lavas--provides the most completely constrained estimate of the bulk composition of fast-spreading oceanic crust so far. Simple crystallization models using this bulk crustal composition as the parental melt accurately predict the bulk composition of both the lavas and the plutonic rocks. However, the recovered plutonic rocks show early crystallization of orthopyroxene, which is not predicted by current models of melt extraction from the mantle and mid-ocean-ridge basalt differentiation. The simplest explanation of this observation is that compositionally diverse melts are extracted from the mantle and partly crystallize before mixing to produce the more homogeneous magmas that erupt.