Alkyl Halide Reactions: SN2 Substitution Reactions
Suitable alkyl halides undergo SN2 substitution with nucleophiles such as OH−, MeO− and EtO−. These ions are also strong bases, so E2 elimination can compete. Strong basicity is not required for SN2; the water example below shows a neutral nucleophile, although direct hydrolysis of a primary halide can be slow.
SN2 Subsitution Reactions

The same basic reagents can promote E2. The hot conditions pictured below can favor elimination, but E2 can also occur without added heat:
E2 Elimination and Temperature

Unhindered primary halides often favor SN2 with small nucleophiles; secondary halides show greater E2 competition, and tertiary halides do not undergo ordinary SN2. Substrate, base/nucleophile, solvent and temperature determine the competing rates. Heating can change the product ratio; it does not turn an SN2 step into an E2 step.
Mechanism
The reaction mechanism is depicted below using sodium methoxide (NaOMe) however, it would proceed the same way using other suitable nucleophiles; the product group must match the nucleophile:

One of the hallmarks of SN2 and E2 reactions is that they occur in 1 step! The free electrons from the negatively charged oxygen atom on the NaOMe molecule attack the carbon atom, releasing the halide (Br in this case).
To learn more about SN2 and E2 reactions and how to distinguish them, be sure to check out our Lessons!
Practice this reaction using our Reaction Solver!