Reaction SMILES: [F:1][CH:2]1[C:7](=[O:8])[CH2:6][CH2:5][N:4]([C:9]2[N:13]([CH3:14])[N:12]=[CH:11][C:10]=2[N+:15]([O-:17])=[O:16])[CH2:3]1.B(F)(F)F.CCOCC.[N+](=[CH:29][C:30]([O:32][CH2:33][CH3:34])=[O:31])=[N-].O>C(Cl)Cl>[F:1][CH:2]1[CH2:3][N:4]([C:9]2[N:13]([CH3:14])[N:12]=[CH:11][C:10]=2[N+:15]([O-:17])=[O:16])[CH2:5][CH2:6][CH:29]([C:30]([O:32][CH2:33][CH3:34])=[O:31])[C:7]1=[O:8]
Reactant: CCOC(=O)C=[N+]=[N-]
Reactant: Cn1ncc([N+](=O)[O-])c1N1CCC(=O)C(F)C1
Agent: FB(F)F
Solvent: CCOCC
Solvent: ClCCl
Solvent: O
Product: CCOC(=O)C1CCN(c2c([N+](=O)[O-])cnn2C)CC(F)C1=O
Temperature: -5 °C
Reaction time: 1 h
Yield: 58.8 %

Procedure:
To a solution of 3-fluoro-1-(1-methyl-4-nitro-1H-pyrazol-5-yl)piperidin-4-one (1.07 g, 4.40 mmol) in DCM (10 mL) at −5° C. was added dropwise a solution of boron trifluoride diethyl etherate (0.71 ml, 5.72 mmol) in DCM (1 mL). The mixture was stirred for 30 min before a solution of ethyl diazoacetate (0.60 ml, 5.72 mmol) in DCM (1 mL) was added. The mixture was stirred at −5° C. for 1 hr before being allowed to warm to room temperature. Water (5 mL) was added and the mixture stirred for 30 min. The organic layer was passed through a phase separation cartridge and concentrated under reduced pressure. Purification via silica gel column chromatography (0-100% EtOAc/isohexane) gave ethyl 6-fluoro-1-(1-methyl-4-nitro-1H-pyrazol-5-yl)-5-oxoazepane-4-carboxylate as a yellow gum (0.85 g, 58%). This gum was re-dissolved in 3 M hydrochloric acid (30 mL) and heated at 100° C. for 4 hr. The mixture was concentrated under reduced pressure, re-dissolved in DCM (30 mL) and washed with water (20 mL). The organic phase was passed through a phase separation cartridge and concentrated under reduced pressure. Purification via silica gel column chromatography (0-100% EtOAc/isohexane) gave 3-fluoro-1-(1-methyl-4-nitro-1H-pyrazol-5-yl)azepan-4-one as a pale yellow solid (0.30 g, 45%). To a solution of this solid (0.30 g, 1.15 mmol) in anhydrous MeOH (6 mL) and DCM (6 mL) was added ammonium acetate (0.709 g, 9.20 mmol) and crushed activated 4 Å molecular sieves. The mixture was heated at 55° C. for 4 hr before being cooled to room temperature. Sodium cyanoborohydride (80 mg, 1.27 mmol) was added portionwise and the mixture stirred at room temperature for 1 hr. The mixture was filtered and concentrated under reduced pressure. The residue was re-dissolved in DCM (10 mL) and washed with 10% aqueous NaOH (10 mL). The aqueous washings were extracted with EtOAc (3×20 mL) and the combined organic layers were passed through a phase separation cartridge and concentrated under reduced pressure. Purification via amine-functionalized silica gel column chromatography (0-100% EtOAc/isohexane) gave 3-fluoro-1-(1-methyl-4-nitro-1H-pyrazol-5-yl)azepan-4-amine as a yellow gum (0.205 g, 69%). To solution of this gum (0.20 g, 0.79 mmol) and DIPEA (0.37 mL, 2.13 mmol) in DCM (5 mL) was added dropwise trifluoroacetic anhydride (0.11 mL, 0.78 mmol). The mixture was stirred at room temperature for 16 hr before being washed with water (10 mL). The organic layer was separated, passed through a phase separation cartridge and concentrated under reduced pressure. Purification via silica gel column chromatography (0-100% EtOAc/isohexane) gave tert-butyl 3-fluoro-1-(1-methyl-4-nitro-1H-pyrazol-5-yl)azepan-4-ylcarbamate as a pale yellow solid (140 mg, 55%). LCMS (ES+) m/z 354 (M+1).