A truncation error analysis has been developed for the approximation of spatial derivatives in smoothed particle hydrodynamics (SPH) and related first-order consistent methods such as the first-order form of the reproducing kernel particle method. Error is shown to depend on both the smoothing length It and the ratio of particle spacing to smoothing length, Delta x/h. For uniformly spaced particles in one dimension, analysis shows that as h is reduced while maintaining constant Delta x/h, error decays as h(2) until a limiting discretization error is reached, which is independent of h. If Delta x/h is reduced while maintaining constant h (i.e. if the number of neighbours per particle is increased), error decreases at a rate which depends on the kernel function's smoothness. When particles are distributed nonuniformly, error can grow as h is reduced with constant Delta x/h. First-order consistent methods are shown to remove this divergent behaviour. Numerical experiments confirm the theoretical analysis for one dimension, and indicate that the main results are also true in three dimensions. This investigation highlights the complexity of error behaviour in SPH, and shows that the roles of both h and Delta x/h must be considered when choosing particle distributions and smoothing lengths. Copyright (c) 2005 John Wiley & Sons, Ltd.