The isometric tension recorded from ring segments of branches of human middle cerebral artery was the parameter used to study the inhibition of spasmogen-induced contractions as model for cerebral vasospasm. Concentration-response curves to 5-hydroxytryptamine (10(-9)-3 x 10(-5) M) and prostaglandin F2 alpha (10(-7)-3 x 10(-5) M) were inhibited in Ca(2+)-free medium and in Ca(2+)-free medium to which EGTA (1 mM) had been added, respectively. Nimodipine (10(-7), 10(-5) M), nicardipine (10(-7), 10(-5) M) and Mg2+ (magnesium sulfate 10(-4), 10(-2) M) inhibited the 5-HT-elicited contractions, and this inhibition was similar for the highest concentrations tested. In contrast, nimodipine and nicardipine were more effective than Mg2+ to inhibit the prostaglandin F2 alpha-elicited contractions. Nimodipine (10(-9)-10(-5) M), nicardipine (10(-9)-10(-5) M) and Mg2+ (10(-5)-3 x 10(-2) M) relaxed the arteries precontracted with PGF2 alpha (10(-5) M), but nicardipine was the most potent relaxant drug. Because 5-hydroxytryptamine and prostaglandin F2 alpha may be involved in the pathogenesis of cerebral vasospasm, nimodipine, nicardipine, and Mg2+ could be used in the pharmacological treatment of this disorder. However, dihydropyridines (particularly nicardipine) are more potent anticonstrictors than Mg2+.