The correlation of neuronal activity with sensory input and behavioural output has revealed that information is often encoded in the activity of many neurons across a population, that is, a neural population code is used. The possible algorithms that downstream networks use to read out this population code have been studied by manipulating the activity of a few neurons in a population. We have used this approach to study population coding in a small network underlying the leech local bend, a body bend directed away from a touch stimulus. Because of the small size of this network we are able to monitor and manipulate the complete set of sensory inputs to the network. We show here that the population vector formed by the spike counts of the active mechanosensory neurons is well correlated with bend direction. A model based on the known connectivity of the identified neurons in the local bend network can account for our experimental results, and is suitable for reading out the neural population vector. Thus, for the first time to our knowledge, it is possible to link a proposed algorithm for neural population coding with synaptic and network mechanisms in an experimental system.