The piperidine ring of the title compound, C16H15N5, adopts a chair conformation. The pyridine ring is essentially planar, with a maximum deviation of 0.035 (3) angstrom. The pyrrole and pyridine rings are almost coplanar, forming a dihedral angle of 3.48 (14)degrees. In the crystal, no classical hydrogen bonds were found. In the crystal, the molecules are linked by aromatic pi-pi stacking [centroid-centroid separations = 3.4984 (16) and 3.9641 (15) angstrom between pyrrole and pyridine rings and between pyridine rings, respectively].