The control of excitable cell action potentials is central to animal behavior. We show that the egl-19 gene plays a pivotal role in regulating muscle excitation and contraction in the nematode Caenorhabditis elegans and encodes the alphal subunit of a homologue of vertebrate L-type voltage-activated Ca2+ channels. Semi-dominant, gain-of-function mutations in egl-19 cause myotonia: mutant muscle action potentials are prolonged and the relaxation delayed. Partial loss-of-function mutations cause slow muscle depolarization and feeble contraction. The most severe loss-of-function mutants lack muscle contraction and die as embryos. We localized two myotonic mutations in the sixth membrane-spanning domain of the first repeat (IS6) region, which has been shown to be responsible for voltage-dependent inactivation. A third myotonic mutation implicates IIIS4, a region involved in sensing plasma-membrane voltage change, in the inactivation process.