Eighty years ago, it was proposed that solid hydrogen would become metallic at sufficiently high density. Despite numerous investigations, this transition has not yet been experimentally observed. More recently, there has been much interest in the analog of this predicted metallic transition in the dense liquid, due to its relevance to planetary science. Here, we show direct observation of an abrupt insulator-to-metal transition in dense liquid deuterium. Experimental determination of the location of this transition provides a much-needed benchmark for theory and may constrain the region of hydrogen-helium immiscibility and the boundary-layer pressure in standard models of the internal structure of gas-giant planets.