Present invention provides ectonucleotidase (ecto-nucleotide triphosphate diphosphohydrolase, NTPDase) inhibitors represented by the following formula, namely nucleotide mimetics as selective NTPDase inhibitors. It also provides methods for preparations of said compounds. Furthermore provided are pharmaceutical and diagnostic compositions comprising said compounds, and the use of said compounds in a medicament for treating diseases associated with ectonucleotidase activity and/or P2 receptors.