The Permian Greenhills Complex of Southland, New Zealand, is a small ultramafic to mafic layered intrusion that hosts primary magmatic platinum-group minerals (PGMs) as inclusions in cumulus chromian spinel grains. We have determined the major and trace element chemistry of the parent magmas of the complex, using the composition of rehomogenized melt inclusions trapped in cumulus spinel grains from dunite. These melt inclusions have compositions similar to those of primitive ankaramite dikes that cut the complex, verifying that our data are representative of the parent-melt chemistry. These magmas have high MgO and CaO and are enriched in Pb, Sr, and large ion lithophile elements compared to high field strength and rare earth elements. We suggest that the parent magmas to the complex were primitive low-K island-arc tholeiite basalts that formed by high degrees of melting of a spinel peridotite source. The platinum-group element contents of such magmas are expected to be very high. Therefore, the primary PGMs at Greenhills are suggested to have precipitated directly from the melt following differentiation and cooling in a shallow magma chamber.