We report on the ultrafast photoionization of pyridine, pyridazine, pyrimidine, and pyrazine. These four molecules represent a systematic series of perturbations into the structure of a benzene ring which explores the substitution of a C-H entity with a nitrogen atom, creating a heterocyclic structure. Data are recorded under intense-field, single-molecule conditions. The pulses (50 fs, 800 nm) are focused into the molecular vapor, and ion mass spectra are recorded for intensities of ~10(13) W/cm(2) to ~10(15) W/cm(2). We measure ion yields in the absence of the focal volume effect without the need for deconvolution of the data. For all targets, stable singly- and doubly-charged parent ions (C(6-n)H(6-n)N(n)(+(+))) are observed with features suggesting resonance-enhanced ionization. From the intensity dependence of the ion yield, we infer that excitation occurs both through (1)ππ* transitions (remnants of the benzene structure) and through (1)nπ* transitions, the latter being a result of Rydberg-like excitations of the lone pair electrons of the nitrogen atoms. Stability against intense-field fragmentation is also discussed.