Azido group in purines was used as both a reaction centre and a regioselectivity switch and novel purine ring substitution reactions were developed. This allowed reversing the traditional purine substitution style and forming C-N and C-S bonds. The use of 1,2,3-triazoles as leaving groups in purine SNAr reactions has also been discovered and new C-N, C-S, C-C, C-O and C-P bond formation reactions were developed. The developed methodology is general and can be applied also for synthetic modifications of quinazolines, 7-deazapurines and other heterocycles used in medicinal chemistry. The new purine derivatives have strong luminescent properties and they have been used to develop new metal ion sensors and organic light emitting diodes.