The title compound, C(12)H(17)N(5)O, was obtained by cyclo-condensation of 2,4-diamino-pyrimidine-5-carbonitrile with cyclo-hepta-none. The tetra-hydro-pyrimidine ring has a dis-torted boat conformation and the cyclo-heptane ring adopts a chair conformation. In the crystal, molecules are linked via N-H⋯O and N-H⋯N hydrogen bonds generating a three-dimensional network.