In the title compound, C(17)H(17)N(3)O(5)S(2), the dihedral angle between the two benzene rings is 81.27 (8)° and the heterocyclic ring is oriented at 9.1 (2) and 76.01 (9)° with respect to these rings. Mol-ecules are connected via N-H⋯N and N-H⋯O hydrogen bonds, generating an R(2) (2)(8) motif, into chains running along the [001] direction. There is also an intra-molecular C-H⋯O hydrogen bond completing an S(6) ring motif. The polymeric chains are inter-linked through inter-molecular C-H⋯O hydrogen bonds.