When a near-threshold stimulus is presented, a sensory percept may or may not be produced. The unpredictable outcome of such perceptual judgment is believed to be determined by the activity of neurons in early sensory cortex. We analyzed the responses of neurons in primary somatosensory cortex, recorded while monkeys judged the presence or absence of threshold stimuli. We found that these responses did not covary with the monkeys' perceptual reports. In contrast, the activity of frontal lobe neurons did covary with trial-by-trial judgments. Further control and microstimulation experiments indicated that frontal lobe neurons are closely related to the monkeys' subjective experiences during sensory detection.