Sound velocities of hexagonal close-packed iron (hcp-Fe) were measured at pressures up to 73 gigapascals and at temperatures up to 1700 kelvin with nuclear inelastic x-ray scattering in a laser-heated diamond anvil cell. The compressional-wave velocities (VP) and shear-wave velocities (VS) of hcp-Fe decreased significantly with increasing temperature under moderately high pressures. VP and VS under high pressures and temperatures thus cannot be fitted to a linear relation, Birch's law, which has been used to extrapolate measured sound velocities to densities of iron in Earth's interior. This result means that there are more light elements in Earth's core than have been inferred from linear extrapolation at room temperature.