In the ten-membered 1,3,4,6-tetra-hydro-2H-pyrido[1,2-a]pyrimidine ring system of the title compound, C17H15N5, the 1,2-di-hydro-pyridine ring is essentially planar (r.m.s. deviation = 0.001 Å), while the 1,3-diazinane ring has a distorted twist-boat conformation. In the crystal, mol-ecules are linked by N-H⋯N and C-H⋯N hydrogen bonds, forming a three-dimensional network. In addition, C-H⋯π inter-actions form layers parallel to the (100) plane. Thus, crystal-structure cohesion is ensured. According to a Hirshfeld surface study, H⋯H (40.4%), N⋯H/H⋯N (28.6%) and C⋯H/H⋯C (24.1%) inter-actions are the most important contributors to the crystal packing.