We develop a theory to describe the spatial variation of the particle pitch angle distribution function along a geomagnetic field line. Because spatial variation is most significant inside the loss cone, our theory is tailored to that part of velocity space. A boundary layer equation for the loss cone is derived and then solved. The description of the pitch angle distribution is completed by asymptotically matching the boundary-layer solution to the distribution outside the loss cone, which can be obtained by using the bounce-average diffusion equation. Calculated results for the particle distribution function in representative cases are presented. We apply our theory to ISIS 2 electron flux data for the continuous aurora to deduce the magnitude and the energy dependence of the pitch angle diffusion coefficient. We find that the diffusion coefficient is peaked at the invariant latitude at which the total energy flux into the atmosphere is largest, and that its energy dependence can be fitted with a power law E-n, with 1/2 ≲n≲1. |