Step 1. Synthesis of methyl 5-aminopyridinecarboxylate. Thionyl chloride (178.6 ml, 2.47 mol) was slowly added to a stirred solution of 5-amino-2-pyridine carboxylic acid (170 g, 1.23 mol) in methanol (1700 ml) at 0°C. The reaction mixture was heated to reflux for 72 hours. After completion of the reaction, the mixture was cooled to 0°C and thionyl chloride (40 ml, 0.55 mol) was added again and refluxing was continued for 24 hours. At the end of the reaction, the excess thionyl chloride was removed by distillation under reduced pressure. The crude product was neutralized with aqueous sodium bicarbonate, the solid was collected by filtration and the filter cake was dried at 40-50 °C overnight to give methyl 5-aminopyridinecarboxylate (350 g). The filtrate was extracted with dichloromethane (3 x 2L), the organic phases were combined, washed with brine, dried over anhydrous sodium sulfate and concentrated to dryness to give the crude product (200 g). All solid products were combined to give the final methyl 5-aminopyridinecarboxylate (550 g, theoretical yield 680 g, 73% yield) as a white solid. The structure of the product was confirmed by 1H NMR (400 MHz, CDCl3): δ8.12 (d, J=2.5 Hz, 1H), 7.93 (d, J=8.5 Hz, 1H), 6.97 (dd, J=2.8,8.5 Hz, 1H), 4.24 (br s, 2H), 3.93 (s, 3H).