Seismological observations have revealed the existence of low-velocity and high-attenuation zones above the discontinuity at 410 km depth, at the base of the Earth's upper mantle1,2. It has been suggested that a small amount of melt could be responsible for such anomalies3-5. The density of silicate melt under dry conditions has been measured at high pressure4,6-13 and found to be denser than the surrounding solid, thereby allowing the melt to remain at depth. But no experimental investigation of the density of hydrous melt has yet been carried out. Here we present data constraining the density of hydrous basaltic melt under pressure to examine the stability of melt above the 410-km discontinuity. We infer that hydrous magma formed by partial melting above the 410-km discontinuity may indeed be gravitationally stable, thereby supporting the idea that low-velocity or high-attentuation regions just above the mantle transition zone may result from the presence of melt.