We describe here a general technique for the graded inhibition of cellular excitability in vivo. Inhibition is accomplished by expressing a genetically modified Shaker K(+) channel (termed the EKO channel) in targeted cells. Unlike native K(+) channels, the EKO channel strongly shunts depolarizing current: activating at potentials near E(K) and not inactivating. Selective targeting of the channel to neurons, muscles, and photoreceptors in Drosophila using the Gal4-UAS system results in physiological and behavioral effects consistent with attenuated excitability in the targeted cells, often with loss of neuronal function at higher transgene dosages. By permitting the incremental reduction of electrical activity, the EKO technique can be used to address a wide range of questions regarding neuronal function.