How exactly does the reaction between alkyl halides and silver nitrite occur?

$$\ce{R-X + AgNO\_2 -> RNO\_2}$$
Now depending on the $\ce{R}$ and solvent the reaction can occur via $\mathrm{S\_N1}$ or $\mathrm{S\_N2}$.  

When the reaction proceeds via $\mathrm{S\_N1}$ the product formed is $\ce{R-O-N=O}$ whereas for $\mathrm{S\_N2}$ it is $\ce{R-NO\_2}$.  

Why is this so? According to me as the $\ce{Ag-O}$ bond is covalent the lone pairs on nitrogen must attack in both the cases forming the product $\ce{R-NO\_2}$.





> 
> *The concept of hard and soft acids and bases (HSAB) proved to be
>  useful for rationalizing stability constants of metal complexes. Its application
>  to organic reactions, particularly ambident reactivity, has led
>  to exotic blossoms. By attempting to rationalize all the observed
>  regioselectivities by favorable soft–soft and hard–hard as well as
>  unfavorable hard–soft interactions, older treatments of ambident
>  reactivity, which correctly differentiated between thermodynamic and
>  kinetic control as well as between different coordination states of ionic
>  substrates, have been replaced. By ignoring conflicting experimental
>  results and even referring to untraceable experimental data, the HSAB
>  treatment of ambident reactivity has gained undeserved popularity. In
>  this Review we demonstrate that the HSAB as well as the related
>  Klopman–Salem model do not even correctly predict the behavior of
>  the prototypes of ambident nucleophiles and, therefore, are rather
>  misleading instead of useful guides. An alternative treatment of
>  ambident reactivity based on Marcus theory will be presented.*
> 
> 
> — H. Mayr’s, M. Breugst’s and A. Ofial’s introductory remark in their review pulished in *Angew. Chem. Int. Ed.* **2011**, *50*, 6470. DOI: [10.1002/anie.201007100](http://dx.doi.org/10.1002/anie.201007100).
> 
> 
> 


Within the review, in the section on the nitrite ion, the authors give two competing effects that control product distribution.


For electrophiles with an electrophilicity parameter $E < -3$ (the *bis*-(4-methoxyphenyl)carbenium ion has $E = 0$, lower values are more stabilised carbocations such as *bis*-(4-dimethylaminophenyl)carbenium) the reactions proceed at equilibrium under thermodynamic control and the product yields are equivalent to their relative stabilities. Since nitro compounds are more stable than nitrite esters, they predominate.


$$\ce{R-ONO <=> R+ + NO2- <=>> R-NO2}$$


For electrophiles with a parameter $E > 0$, the reactions are essentially diffusion controlled, i.e. the free electrophile will capture the first nucleophile it can find. This includes tertiary alkyl carbocations ($E \approx 7{-}8$). The reactions **do not** go through classical transition states, and any means of describing them *via* frontier orbitals must fail. **That explicitly includes describing them according to $\mathrm{S\_N1}$ or $\mathrm{S\_N2}$.** In these reactions, kinetic control determines that the $\ce{O}$-attack is slightly more likely with $k\_\ce{O} / k\_\ce{N} \approx 3.4$. (This corresponds to computational models that show a slightly smaller activation barrier for the oxygen attack.)


Reality is more complex than these simple models imply especially for the diffusion controlled reaction. While the attack of oxygen is favoured kinetically, the attack of nitrogen results in less required reordering of the molecule (the two $\ce{N-O}$ bonds would still be identical while they become $\ce{O-N=O}$ in the nitrite ester) which reduces the expected favourism for oxygen. Effects such as solvent and counterion slightly affect the product distribution, and the highest ratio of nitromethane : methyl nitrite can be achieved using $\ce{Bu4N+ NO2-}$ and $\ce{MeI}$ in $\ce{CDCl3}$ (a product ratio of $70\,:\,30$ in favour of nitromethane). Note that $\ce{AgNO2}$ and $\ce{MeI}$ in DMSO yield more methyl nitrate ($54\,:\,46$) although the same electrophile is used. The authors conclude the nitrite section with the statement:



> 
> It should be noted, however, that the selectivities
>  shown in [the table presented in the review] are also not related to the hardness of the electrophiles.
> 
> 
> 




---


**Note**


Throughout this answer, electrophilicity parameters according to Mayr’s equation are used:


$$\lg k\_{20~\mathrm{^\circ C}} = s(E + N)$$


$E$ is a nucleophile-independent electrophilicity parameter while $s$ and $N$ are electrophile-independent nucleophilicity parameters.




---


**Bibliography**


A paper related solely to studying the nitrite anion: A. A. Tishkov, U. Schmidhammer, S. Roth, E. Riedle, H. Mayr, *Angew. Chem. Int. Ed.* **2005**, *44*, 4623. DOI: [10.1002/anie.200501274](http://dx.doi.org/10.1002/anie.200501274).


The review mentioned in the opening, concerning all sorts of ambient nucleophiles often explained *via* the HSAB concept: H. Mayr, M. Breugst, A. Ofial, *Angew. Chem. Int. Ed.* **2011**, *50*, 6470. DOI: [10.1002/anie.201007100](http://dx.doi.org/10.1002/anie.201007100).


 6

Pearson's [HSAB theory](https://en.wikipedia.org/wiki/HSAB_theory) provides a simple explanation. When the reaction proceeds via $S\_N1$, a hard acid (electrophile) is firstly generated (the carbocation) which interacts with the harder part of the nitrite anion an that's the oxygen-hard nucleophile. The $S\_N2$ proceeds smoothly for the pair soft nucleophile–soft electophile. 


In the given example the soft electrophilic carbon reacts with the soft center of the nitrite anion, and that's the nitrogen atom. In the former case, the silver coordinated to the oxygen definitely weakens its nucleophilicity. The formed carbocation has to be pretty hard and not so much stabilized by the solvent for the O-attack to be operative.


 3