The reaction of ethyl 7-chloro-6-fluoro-1,4-dihydro-4-oxo-3-quinolinecarboxylate (I) with O-(2,4-dinitrophenyl)hydroxylamine (II) by means of K2CO3 in DMF gives ethyl 1-amino-6-fluoro-7-chloro-1,4-dihydro-4-oxo-3-quinolinecarboxylate (III), which is formylated with HCOOH in acetic anhydride yielding the corresponding 1-(formylamino) compound (IV). The methylation of (IV) with MeI and K2CO3 in DMF affords the 1-(formylmethylamino) compound (V), which is hydrolyzed with NaOH in refluxing water to give 7-chloro-6-fluoro-1,4-dihydro-4-oxo-1-(methylamino)quinoline-3-carboxylic acid (VI). Finally, this compound is condensed with N-methylpiperazine (VII) in refluxing pyridine.