During the slug stage, the cellular slime mould Dictyostelium discoideum moves towards light sources. We have modelled this phototactic behaviour using a hybrid cellular automata/partial di¡erential equation model. In our model, individual amoebae are not able to measure the direction from which the light comes, and di¡erences in light intensity do not lead to di¡erentiation in motion velocity among the amoebae. Nevertheless, the whole slug orientates itself towards the light. This behaviour is mediated by a modi¢cation of the cyclic AMP (cAMP) waves. As an explanation for phototaxis we propose the following mechanism, which is basically characterized by four processes: (i) light is focused on the distal side of the slug as a result of the so-called`lens-e¡ect'; (ii) di¡erences in luminous intensity cause di¡erences in NH 3 concentration; (iii) NH 3 alters the excitability of the cell, and thereby the shape of the cAMP wave; and (iv) chemotaxis towards cAMP causes the slug to turn. We show that this mechanism can account for a number of other behaviours that have been observed in experiments, such as bidirectional phototaxis and the cancellation of bidirectionality by a decrease in the light intensity or the addition of charcoal to the medium.