Due to the varied and potent biological activity of 3-deazaguanine (20), 3-deaza-7-β-D-ribofuranosylguanine, 3-deazaguanosine (22), and 3-deazaguanylic acid (21), several 3-deazaguanines, mainly with modification in the 7 and 9 positions, were prepared. 7-(5-Deoxy-β-D-ribofuranosyl)- and 7-(tetrahydropyran-2-yl)-3-deazaguanine (12 and 13) were obtained by ammonolysis of the corresponding 1-substituted methyl 4-(cyanomethyl)imidazole-5-carboxylates, 6 and 8, and subsequent in situ cyclization. 9-(5-Deoxy-β-D-ribofuranosyl)- and 9-(tetrahydropyran-2-yl)-3-deazaguanine (14 and 15) were obtained by ammonolysis of the corresponding 1-substituted methyl 5-(cyanomethyl)imidazole-4-carboxylates, 5 and 7, to provide 1-(5-deoxy-β-D-ribofuranosyl)- and 1-tetrahydropyran-2-yl)-5-(cyanomethyl)imidazole-4-carboxamides (9 and 10, respectively), which were subsequently cyclized with aqueous potassium carbonate. Methyl 4-(cyanomethyl)-1- or -3-(5-deoxy-2,3-di-O-acetyl-β-D-ribofuranosyl)imidazole-5(4)-carboxylates, 5 and 6, were obtained from the stannic chloride catalyzed condensation of methyl 5(4)-(cyanomethyl)-1-(trimethylsilyl)imidazole-4(5)-carboxylate (2) and 5-deoxy-1,2,3-tri-O-acetyl-β-D-ribofuranose (3). Methyl 4(5)-(cyanomethyl)imidazole-5(4)-carboxylate (1) and dihydropyran in the presence of acid provided the tetrahydropyran-2-yl derivatives 7 and 8. The in vitro antiviral and antibacterial activity of these 3-deazaguanines, their imidazolecarboxamide precursors, and several acetylated derivatives were compared with 3-deazaguanine (20), 3-deazaguanosine (22), and 3-deazaguanylic acid (24), their imidazolecarboxamide precursors, 4(5)-(cyanomethyl)imidazole-5(4) carboxamide (19), 6-(cyanomethyl)-1-β-D-ribofuranosylimidazole-4-carboxamide (21), and 5-(cyanomethyl)-1-β-D-ribofuranosylimidazole-4-carboxamide 5'-phosphate (23), and ribavirin. The most active compounds, 19, 21, and 23, possessed an in vitro antiviral spectrum similar to, but generally less potent than, the corresponding ring-closed compounds 20, 22, and 24. Compound 23 was found to be a potent, specific inhibitor of IMP dehydrogenase. Data are presented which support the antiviral activity of 19, 21, and 23 independent of the possible enzymatic cyclization to the corresponding imidazo[4,5-c]pyridine.