Pavlovian trace conditioning depends on the temporal gap between the conditioned and unconditioned stimuli. It requires, in mammals, functional medial temporal lobe structures and, in humans, explicit knowledge of the temporal contingency. It is therefore considered to be a plausible objective test to assess awareness without relying on explicit reports. We found that individuals with disorders of consciousness (DOCs), despite being unable to report awareness explicitly, were able to learn this procedure. Learning was specific and showed an anticipatory electromyographic response to the aversive conditioning stimulus, which was substantially stronger than to the control stimulus and was augmented as the aversive stimulus approached. The amount of learning correlated with the degree of cortical atrophy and was a good indicator of recovery. None of these effects were observed in control subjects under the effect of anesthesia (propofol). Our results suggest that individuals with DOCs might have partially preserved conscious processing, which cannot be mediated by explicit reports and is not detected by behavioral assessment.