N-Nitrosacarboxamides 1 undergo a highly-solvent-dependent thermal rearrangement at 80- 100" C via diazenes 2 to products derived either from diazoalkanes 3 (path a) or carbocationic intermediates 4 (path b, eq I).,-" Nitrosamides of primary n-alkylamines follow path a almost exclusively in nonpolar solvents where the initially formed diazoalkane and carboxylic acid rapidly recombine to ester 5 in high yield. s* 6