The ability of a large-eddy simulation to represent the large-scale motions in the interior of a turbulent flow is well established. However, concerns remain for the behaviour close to rigid surfaces where, with the exception of low-Reynolds-number flows, the large-eddy description must be matched to some description of the flow in which all except the larger-scale ‘inactive’ motions are averaged. The performance of large-eddy simulations in this near-surface region is investigated and it is pointed out that in previous simulations the mean velocity profile in the matching region has not had a logarithmic form. A number of new simulations are conducted with the Smagorinsky (1963) subgrid model. These also show departures from the logarithmic profile and suggest that it may not be possible to eliminate the error by adjustments of the subgrid lengthscale. An obvious defect of the Smagorinsky model is its failure to represent stochastic subgrid stress variations. It is shown that inclusion of these variations leads to a marked improvement in the near-wall flow simulation. The constant of proportionality between the magnitude of the fluctuations in stress and the Smagorinsky stresses has been empirically determined to give an accurate logarithmic flow profile. This value provides an energy backscatter rate slightly larger than the dissipation rate and equal to idealized theoretical predictions (Chasnov 1991).