[Cl:1][C:2]1[C:11]2[C:6](=[CH:7][C:8]([O:16]C(=O)C)=[C:9]([O:12]C(=O)C)[CH:10]=2)[N:5]=[CH:4][N:3]=1.[C:20]([C:22]1[CH:23]=[C:24]([CH:26]=[CH:27][CH:28]=1)[NH2:25])#[CH:21]>>[ClH:1].[C:20]([C:22]1[CH:23]=[C:24]([NH:25][C:2]2[C:11]3[C:6](=[CH:7][C:8]([OH:16])=[C:9]([OH:12])[CH:10]=3)[N:5]=[CH:4][N:3]=2)[CH:26]=[CH:27][CH:28]=1)#[CH:21]A method for the preparation of erlotinib hydrochloride was disclosed in US 2009/0306377. The method, illustrated in Scheme 2, involves treating 6,7-dimethoxy-4(3H)-quinazolone (5) with hydrobromic acid or pyridine-hydrochloric acid to afford 6,7-dihydroxy-4(3H)-quinazolone (6), which was diacetylated with acetic anhydride to afford diester (7), which was treated with oxalyl chloride/DMF to afford 4-chloro-6,7-diacetoxyquinazoline (8). Compound (8) was condensed with 3-ethynylaniline to afford N-(3-ethynylphenyl)-6,7-dihydroxy-4-quinazolinamine hydrochloride (9), which was converted into the diol N-(3-ethynylphenyl)-6,7-dihydroxy-4-quinazolinamine (10) by treatment with aqueous ammonia/methanol. The diol (10) was treated with 2-iodo-ethylmethyl ether to yield compound (4) which on treatment with HCl afforded erlotinib hydrochloride (1). However, this preparation of erlotinib hydrochloride is a long synthetic route and gives low yields and requires very toxic reagents like pyridine, HBr and controlled reagents like acetic anhydride. Hence, it is not suitable for large scale production.