One contribution of 17 to a theme issue 'Moving in a moving medium: new perspectives on flight'. While prior studies of swallow manoeuvering have focused on slow-speed flight and obstacle avoidance in still air, swallows survive by foraging at high speeds in windy environments. Recent advances in field-portable, high-speed video systems, coupled with precise anemometry, permit measures of high-speed aerial performance of birds in a natural state. We undertook the present study to test: (i) the manner in which barn swallows (Hirundo rustica) may exploit wind dynamics and ground effect while foraging and (ii) the relative importance of flapping versus gliding for accomplishing high-speed manoeuvers. Using multi-camera videography synchronized with wind-velocity measurements, we tracked coursing manoeuvers in pursuit of prey. Wind speed averaged 1.3-2.0 m s 21 across the atmospheric boundary layer, exhibiting a shear gradient greater than expected, with instantaneous speeds of 0.02-6.1 m s 21 . While barn swallows tended to flap throughout turns, they exhibited reduced wingbeat frequency, relying on glides and partial bounds during maximal manoeuvers. Further, the birds capitalized on the near-earth wind speed gradient to gain kinetic and potential energy during both flapping and gliding turns; providing evidence that such behaviour is not limited to large, fixed-wing soaring seabirds and that exploitation of wind gradients by small aerial insectivores may be a significant aspect of their aeroecology.This article is part of the themed issue 'Moving in a moving medium: new perspectives on flight'.