We report a systematic solid-state (17)O NMR study of free nucleic acid bases: thymine (T), uracil (U), cytosine (C), and guanine (G). Site-specifically (17)O-enriched samples were synthesized:[2-(17)O]thymine (1), [4-(17)O]thymine (2), [2-(17)O]uracil (3), [4-(17)O]uracil (4), [2-(17)O]cytosine (5), and [6-(17)O]guanine monohydrate (6). Magic-angle-spinning (MAS) and static (17)O NMR spectra were acquired at 11.75 T for compounds 1-6, from which information about the (17)O chemical shift and electric field gradient tensors was obtained. Extensive quantum chemical calculations were performed at the B3LYP/6-311++G(d,p) level of theory for (17)O NMR properties in various molecular models. The calculated (17)O NMR tensors are highly sensitive to the description of intermolecular hydrogen-bonding interactions at the target oxygen atom. A reasonably good agreement between experimental solid-state (17)O NMR data and B3LYP/6-311++G(d,p) calculations is achievable only in molecular cluster models where a complete hydrogen-bond network is considered. Using this theoretical approach, we also investigated the (17)O NMR tensors in two unusual structures: guanine- and uracil-quartets.