Reaction of 2-bromo-5-methoxybenzoic acid (I) with hydrazine hydrate gave hydrazinobenzoic acid (II), which was cyclized to indazole (III) on heating with hydrochloric acid. Subsequent alkylation with 2-[4-(chloromethyl)phenoxymethyl]quinoline hydrochloride (IV) in the presence of sodium hydroxide in DMSO provided (V), and treatment of this with HCl in acetone furnished the target dihydrochloride.