Compound 1 obtained by random screening and displaying a micromolar activity on the mu opiate receptor was chosen as a starting point for optimization. Two complementary concepts of similarity were used for the design of analogues and compared. These are based, respectively, on a computer-aided comparison of pharmacophoric patterns and on topological similarity. The structure-activity relationships are discussed in light of both similarity concepts. Compound 40, an N-methyl-3-(4-oxo-1-phenyl-1,3,8-triazaspiro[4.5]decyl)acetamide derivative, designed by combining the structure-activity relationships enlightened by each method, has a subnanomolar affinity for mu (h) receptor (IC(50) = 0.9 nM). It is a promising lead, allowing the design of a new series of analogues substituted at the N-3 of the spirocycle moiety.