triflate inversion, whereas with neighbouring benzyl ether groups or axial ester groups, mixtures are generally produced. In the present study, the origin of this difference was addressed. The ambidentreactivity of the nitrite ion has been found to be the cause of the complex product formation observed, which can be controlled by a neighbouring equatorial ester group. Both N-attack and O-attack occur