In the title compound, C(17)H(16)N(6)O(2)S, an intra-molecular N-H⋯O inter-action generates an S(6) ring. The pyridine ring makes a dihedral angle of 71.38 (11)° with the thio-phene ring. In the crystal, mol-ecules are linked by a pair of N-H⋯N hydrogen bonds, forming an inversion dimer. The dimers are stacked in columns along the b axis through weak inter-molecular C-H⋯N hydrogen bonds.