We demonstrate how the optical transmission by a directly illuminated, sub-wavelength slit in a metal film can be dynamically controlled by varying the incident beam's phase relative to that of a stream of surface plasmon polaritions which are generated at a nearby grating. The transmission can be smoothly altered from its maximum value to practically zero. The results from a simple model and from rigorous numerical simulations are in excellent agreement with our experimental results. Our method may be applied in all-optical switching.