Step 1: In a 250 mL round-bottom flask, dimethyl 2-aminoterephthalate (3 g, 0.0143 mol) and urea (4.3 g, 0.0717 mol) were added. The reaction mixture was stirred at 200 °C for 3 hours. Subsequently, the reaction mixture was cooled down to 100 °C and water was added. Stirring of the water-containing reaction mixture was continued at 100 °C for 5-10 min and then cooled to room temperature. The solid product was collected by filtration, washed with chloroform, dried and azeotroped with toluene to afford methyl 2,4-dioxo-1,2,3,4-tetrahydroquinazoline-7-carboxylate (2.5 g, 80% yield). The product can be used directly in the next reaction without further purification.1H NMR (400 MHz, DMSO-d6): δ 11.25 (br s, 2H), 7.98 (d, 1H, J = 8.2 Hz), 7.78 (s, 1H), 7.65 (d, J = 8.2, 1.2 Hz, 1H), 3.98 (s, 3H). LC-MS (ESI): calculated mass: 220.0; observed mass: 221.0 [M + H]+ (RT: 0.19 min).