Abstract. Motivated by experimental observations of the head direction system, we study a three population network model that operates as a continuous attractor network. This network is able to store in a short-term memory an angular variable (the head direction) as a spatial profile of activity across neurons in the absence of selective external inputs, and to accurately update this variable on the basis of angular velocity inputs. The network is composed of one excitatory population and two inhibitory populations, with inter-connections between populations but no connections within the neurons of a same population. In particular, there are no excitatory-to-excitatory connections. Angular velocity signals are represented as inputs in one inhibitory population (clockwise turns) or the other (counterclockwise turns). The system is studied using a combination of analytical and numerical methods. Analysis of a simplified model composed of threshold-linear neurons gives the conditions on the connectivity for (i) the emergence of the spatially selective profile, (ii) reliable integration of angular velocity inputs, and (iii) the range of angular velocities that can be accurately integrated by the model. Numerical simulations allow us to study the proposed scenario in a large network of spiking neurons and compare their dynamics with that of head direction cells recorded in the rat limbic system. In particular, we show that the directional representation encoded by the attractor network can be rapidly updated by external cues, consistent with the very short update latencies observed experimentally by Zugaro et al. (2003) in thalamic head direction cells.