Physical systems with loss or gain have resonant modes that decay or grow exponentially with time. Whenever two such modes coalesce both in their resonant frequency and their rate of decay or growth, an ‘exceptional point’ occurs, giving rise to fascinating phenomena that defy our physical intuition1,2,3,4,5,6. Particularly intriguing behaviour is predicted to appear when an exceptional point is encircled sufficiently slowly7,8, such as a state-flip or the accumulation of a geometric phase9,10. The topological structure of exceptional points has been experimentally explored11,12,13, but a full dynamical encircling of such a point and the associated breakdown of adiabaticity14,15,16,17,18,19,20,21have remained out of reach of measurement. Here we demonstrate that a dynamical encircling of an exceptional point is analogous to the scattering through a two-mode waveguide with suitably designed boundaries and losses. We present experimental results from a corresponding waveguide structure that steers incoming waves around an exceptional point during the transmission process. In this way, mode transitions are induced that transform this device into a robust and asymmetric switch between different waveguide modes. This work will enable the exploration of exceptional point physics in system control and state transfer schemes at the crossroads between fundamental research and practical applications.