In the C. elegans hermaphrodite the expulsion step of defecation depends on the coordinated contraction of three enteric muscle groups: the anal depressor muscle, the intestinal muscles, and the sphincter muscle. These muscles are activated by excitatory GABA neurotransmission. Mutations in 13 genes that affect activation of these enteric muscles have previously been identified. We show that the larval male defecates by contracting the same set of enteric muscles, and that these contractions require 12 of these 13 genes. However, near the end of the last larval stage, the male anal region undergoes a developmental change, including dramatic hypertrophy of the anal sphincter muscle and the opening of a cloacal canal. We find that this modified sphincter must now relax to permit defecation. In contrast to the larval male, we find that in the adult male only 2 of the 13 genes required for enteric muscle contraction, unc-25 and unc-47, are important for sphincter muscle relaxation. unc-25 and unc-47 are required for the synthesis and utilization of GABA. We also find that two other genes, unc-46 and unc-49, previously implicated in the inhibitory action of GABA on body-wall muscle, are also required for normal adult male sphincter relaxation. In these mutants, failure to relax the sphincter muscle results in a constipated phenotype, and killing the sphincter muscle rescues this phenotype. We also find that a GABA agonist or GABA itself can suppress the adult male sphincter relaxation defect of unc-25 mutants.