Receptivity in three-dimensional boundary-layer flow to localized surface roughness and free-stream vorticity is studied. A boundary layer of Falkner–Skan–Cooke type with favourable pressure gradient is considered to model the flow slightly downstream of a swept-wing leading edge. In this region, stationary and travelling crossflow instability dominates over other instability types. Three scenarios are investigated: the presence of low-amplitude chordwise localized, spanwise periodic roughness elements on the plate, the impingement of a weak vortical free-stream mode on the boundary layer and the combination of both disturbance sources. Three receptivity mechanisms are identified: steady receptivity to roughness, unsteady receptivity to free-stream vorticity and unsteady receptivity to vortical modes scattered at the roughness. Both roughness and vortical modes provide efficient direct receptivity mechanisms for stationary and travelling crossflow instabilities. We find that stationary crossflow modes dominate for free-stream turbulence below a level of about 0.5%, whereas higher turbulence levels will promote the unsteady receptivity mechanism. Under the assumption of small amplitudes of the roughness and the free-stream disturbance, the unsteady receptivity process due to scattering of free-stream vorticity at the roughness has been found to give small initial disturbance amplitudes in comparison to the direct mechanism for free-stream modes. However, in many environments free-stream vorticity and roughness may excite interacting unstable stationary and travelling crossflow waves. This nonlinear process may rapidly lead to large disturbance amplitudes and promote transition to turbulence.