The high-pressure solubility in silicate liquids of moderately siderophile 'iron-loving' elements (such as nickel and cobalt) has been used to suggest that, in the early Earth, an equilibrium between core-forming metals and the silicate mantle was established at the bottom of a magma ocean. But observed concentrations of the highly siderophile elements - such as the platinum-group elements platinum, palladium, rhenium, iridium, ruthenium and osmium - in the Earth's upper mantle can be explained by such a model only if their metal-silicate partition coefficients at high pressure are orders of magnitude lower than those determined experimentally at one atmosphere (refs 3-8). Here we present an experimental determination of the solubility of palladium and platinum in silicate melts as a function of pressure to 16 GPa (corresponding to about 500 km depth in the Earth). We find that both the palladium and platinum metal-silicate partition coefficients, derived from solubility, do not decrease with pressure - that is, palladium and platinum retain a strong preference for the metal phase even at high pressures. Consequently the observed abundances of palladium and platinum in the upper mantle seem to be best explained by a 'late veneer' addition of chondritic material to the upper mantle following the cessation of core formation.