The present invention relates to optionally substituted 3-amino-4,5-dihydro-(1H or 2H)-pyrazolo[3,4-d]pyrimidin-6(7H)-ones and their 4-imino or 4-thioxo derivatives, e.g., 3-amino-4-(thioxo or imino)-4,5-dihydro-2H-pyrazolo[3,4-d]pyrimidin-6(7H)-ones, 3-amino-4-(thioxo or imino)-4,5-dihydro-2H-pyrazolo[3,4-d]pyrimidin-6(7H)-ones, 3-amino-4-(thioxo or imino)-4,5-dihydro-1H-pyrazolo[3,4-d]pyrimidin-6(7H)-ones, processes for their production, their use as pharmaceuticals and pharmaceutical compositions comprising them.