In the title compound, C14H13N5OS, the dihedral angle between the fused ring system (r.m.s. deviation = 0.028 A ° ) and the phenyl ring is 48.24 (4). The molecule features both an intramolecular N—H  O and an N—H  N hydrogen bond. In the crystal, molecules are linked by N—H  O and N—H  N hydrogen bonds, generating a three-dimensional network. A weak N—H   interaction is also observed.