The condensation of bromoacetaldehyde dimethyl acetal (I) with methylamine (II) by means of KOH in refluxing ethylene glycol gives bis(2,2-dimethoxyethyl)methylamine (III), which is cyclized with acetonedicarboxylic acid (IV) and more methylamine (II), yielding 3,9-dimethyl-3,9-diazabicyclo[3.3.1]nonan-7-one (V). The reaction of (V) with hydroxylamine affords the corresponding oxime (VI), which is reduced with H2 over RaNi in ethanol giving endo-3,9-dimethyl-3,9-diazabicyclo[3.3.1]nonan-7-amine (VII). Finally, this compound is condensed with 1H-indazole-3-carbonyl chloride (VIII) by means of dimethylaminopyridine (DMAP) in pyridine.