Optogenetics is a recently developed method in which neurons are genetically modified to express membrane proteins sensitive to light, enabling precisely targeted control of neural activity [1, 2, 3]. The temporal and spatial precision afforded by neural stimulation by light holds promise as a powerful alternative to current methods of neural control, which rely predominantly on electrical and pharmacological methods, in both research and clinical settings [4, 5]. Although the optogenetic approach has been widely used in rodent and other small animal models to study neural circuitry [6, 7, 8], its functional application in primate models has proven more difficult. In contrast to the relatively large literature on the effects of cortical electrical microstimulation in perceptual and decision-making tasks [9, 10, 11, 12, 13], previous studies of optogenetic stimulation in primates have not demonstrated its utility in similar paradigms [14, 15, 16, 17, 18]. In this study, we directly compare the effects of optogenetic activation and electrical microstimulation in the lateral intraparietal area during a visuospatial discrimination task. We observed significant and predictable biases in visual attention in response to both forms of stimulation that are consistent with the experimental modulation of a visual salience map. Our results demonstrate the power of optogenetics as a viable alternative to electrical microstimulation for the precise dissection of the cortical pathways of high-level processes in the primate brain.