The present invention relates to potentiation of the analgesic effect of opioids as well as to attenuation of the addiction thereof. More specifically, the present invention relates to the use of a group of sigma receptor ligands of formula I for the potentiation of the analgesic effect of opioids and at the same time for decreasing of the dependency induced by them.