In the title compound, C19H15N5S, the thiophene ring is disordered in a 0.6:0.4 ratio by an approximate 180° rotation of the ring around the C—C bond linking it to the pyridine ring. In the crystal, the molecules are linked by N—H...N hydrogen bonds into dimers with an R
2
2(12) motif, forming chains along the b-axis direction. These chains are connected to each other by further N—H...N hydrogen bonds, forming a three-dimensional network. Furthermore, N—H...π and π–π [centroid–centroid separations = 3.899 (8) and 3.7938 (12) Å] interactions also contribute to the crystal cohesion. A Hirshfeld surface analysis indicated that the most important contributions to the surface contacts are from H...H (46.1%), N...H/H...N (20.4%) and C...H/H...C (17.4%) interactions.