Positive GABA A modulators and other sedatives, anxiolytics, and anticonvulsants were used to evaluate mechanisms underlying the discriminative stimulus effects of midazolam in untreated monkeys and of flumazenil in monkeys treated with diazepam (5.6 mg/kg/day). Positive GABA A modulators at benzodiazepine (e.g., flunitrazepam and abecarnil) and neuroactive steroid sites (e.g., androsterone) substituted for midazolam in all monkeys; the neuroactive steroids dihydroandrosterone and epipregnanolone substituted for midazolam in two of three monkeys. All positive GABA A modulators attenuated flumazenil in diazepam-treated monkeys; doses of flunitrazepam and abecarnil larger than doses substituting for midazolam were required to attenuate flumazenil, whereas doses of neuroactive steroids smaller than doses substituting for midazolam attenuated flumazenil. Drugs with mechanisms that do not predominantly involve allosteric modulation of GABA (e.g., buspirone, ketamine, valproic acid, and diphenhydramine) did not substitute for midazolam or flumazenil. However, valproic acid enhanced the midazolam discriminative stimulus and attenuated the flumazenil discriminative stimulus; diphenhydramine attenuated the midazolam discriminative stimulus. These results suggest that drugs not sharing a mechanism of action with benzodiazepines can modulate the behavioral effects of benzodiazepines. In addition, this study demonstrates that endogenous ligands, presumably by acting at neuroactive steroid sites on the GABA A receptor complex, share discriminative stimulus effects with benzodiazepines. This study also suggests that positive GABA A -modulating neuroactive steroids are especially potent in attenuating behavioral effects that are related to diazepam withdrawal.