A cellular automaton model of the vertical and lateral growth that occurs in a termite nest expansion is formulated. The model consists of a lattice of building sites permeated by a trail network of termites. Termites are recruited from the network to build at these sites by an attractive pheromone which emanates from building pellets. The experimentally observed behaviour in which termites halt and then retreat from overcrowded sites is also incorporated along with the assumption that termites which retreat then build on nearby sites. Simulations without this response to crowding result in disordered, unrealistic nest structures, while its inclusion qualitatively reproduces two previously unexplained features of nest expansion. First, the active surface formed by joining the tips of growing pillars maintains a smooth appearance through time. Second, the model explains how building activity spreads laterally over the building domain. The competition between the attractive pheromone and inhibitory crowding stimuli drives the system to a critical state where the correlation length (distance over which building sites interact) diverges, i.e. all building sites interact with each other. An explicit mapping of a particular case of the model onto the sandpile model of self-organized criticality is exhibited. The criticality of the model determines power-law scalings of the system's dependence on the density of termites on the trail network and the size of the building domain. The model makes several experimentally testable predictions. Copyright 1999 Academic Press.