To trigger action potentials in neurons, most investigators use electrical or chemical stimulation. Here we describe an optical stimulation method based on semi-synthetic light-activated ion channels. These SPARK (synthetic photoisomerizable azobenzene-regulated K(+)) channels consist of a synthetic azobenzene-containing photoswitch and a genetically modified Shaker K(+) channel protein. SPARK channels with a wild-type selectivity filter elicit hyperpolarization and suppress action potential firing when activated by 390 nm light. A mutation in the pore converts the K(+)-selective Shaker channel into a nonselective cation channel. Activation of this modified channel with the same wavelength of light elicits depolarization of the membrane potential. Expression of these depolarizing SPARK channels in neurons allows light to rapidly and reversibly trigger action potential firing. Hence, hyper- and depolarizing SPARK channels provide a means for eliciting opposite effects on neurons in response to the same light stimulus.