The condensation of (2alpha,3alpha,5alpha,16alpha,17alpha)-2,3:16,17-diepoxyandrostan-17-ol acetate (I) with pyrrolidine (II) by means of NaOH in methanol, followed by reduction with NaBH4 in the same solvent gives (2alpha,3alpha,5alpha,16beta,17beta)-2,3-epoxy-16-(1-pyrrolidinyl) androstan-17-ol (III), which is further condensed with morpholine (IV) in refluxing water yielding (2beta,3alpha,5alpha,16beta,17beta)-2-(4-morpholinyl)-16-(1-pyrrolidinyl)androstane-3,17-diol (V). Partial acetylation of (V) with acetyl chloride in dichloromethane at room temperature affords the corresponding 17-acetoxy derivative (VI), which is finally quaternized with allyl bromide (VII) in dichloromethane.