This paper describes particle transport in Stokes flow in a two-dimensional corner whose walls oscillate, which is a simple model for particle transport in the pulmonary alveoli. Formally speaking, the wall motion produces a perturbation to the well-known Moffatt corner eddies. However, this ‘perturbation’ is dominant as the corner is approached. The motion of particles is regular near to the corner. Far from the corner, chaotic motion within the main part of the flow is restricted to very small regions. We deduce that there is competition between the far-field motion that generates eddies and the wall motion. The relative strengths of these two motions determines whether a given particle moves regularly or chaotically. Consequently, there is an intermediate region in which chaotic transport is maximized.