COCCOC1C=C2C(NC3C=CC=C(C#C)C=3)=NC=NC2=CC=1OCCOC.Cl.C[O:32][C:33]1[CH:34]=[C:35]2[C:40](=[CH:41][C:42]=1[O:43]C)[N:39]=[CH:38][NH:37][C:36]2=[O:45].Br.N1C=CC=CC=1.Cl>>[OH:32][C:33]1[CH:34]=[C:35]2[C:40](=[CH:41][C:42]=1[OH:43])[N:39]=[CH:38][NH:37][C:36]2=[O:45]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.