[N:1]([O-])=O.[Na+].[Br:5][C:6]1[CH:7]=[C:8]2[C:12](=[CH:13][CH:14]=1)[NH:11][CH:10]=[CH:9]2.Cl.[OH2:16]>CC(C)=O>[Br:5][C:6]1[CH:7]=[C:8]2[C:12](=[CH:13][CH:14]=1)[NH:11][N:1]=[C:9]2[CH:10]=[O:16]A solution of NaNO2 (110.4 g, 1.6 mol, 8 eq) in water (200 mL) was added dropwise to a solution of 5-bromoindole (IX) (39.2 g, 0.2 mol, 1 eq) in acetone (1000 mL) stirred at −10→0° C., while adding NaNO2 the solution temperature was maintained below 20° C. An aqueous 2N HCl solution (480 mL) was added slowly to the solution with vigorously stirring while keeping the internal temperature between 0 and 20° C. The solution was further stirred at 20° C. for 3 h after the addition. The solution was concentrated under reduced pressure to remove acetone while keeping the temperature below 35° C. The solid was collected by filtration and transferred to a flask. Cold (−10° C.) DCM (200 mL) was added and stirred for 30 min at −5° C., the solids were filtered and dried under vacuum at 40° C. to get 5-bromo-1H-indazole-3-carbaldehyde (X) (34.0 g, 151 mmol, 76% yield) as a brown solid. ESIMS found for C8H5BrN2O m/z 225 (M+H).