The present invention relates to new substituted pyrazolo[3 4 d]pyrimidine compounds of general formula (I) having a great affinity for sigma receptors especially sigma 1 receptor as well as to the process for the preparation thereof to compositions comprising them and to their use as medicaments for the treatment of i.a. pain. n is selected from 1 2 3 or 4 R represents a carbon linked optionally substituted aryl or heteroaryl radical R and R independently represent a hydrogen atom an optionally substituted aliphatic cycloalkyl cycloalkylalkyl aryl arylalkyl heteroaryl heteroarylalkyl heterocyclyl or heterocyclylalkyl radical or R and R together with the bridging nitrogen form an optionally substituted heterocycloalkyl or heteroaryl radical.