The isomerization of methyl 3-oxo-1,2-benzothiazolin-1,1-dioxide-2-acetate (I) by means of sodium methoxide in DMSO gives methyl 3,4-dihydro-4-oxo-2H-1,2-benzothiazine-1,1-dioxide-3-carboxylate (II), which is methylated with methyl iodide and NaOH in methanol giving methyl 3,4-dihydro-2-methyl-4-oxo-2H-1,2-benzothiazine-1,1-dioxide-3-carboxylate (III). Finally, this product is treated with 2-aminopyridine (A) in refluxing xylene.