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 differential equation model. In our model, individual amoebae are not able to measure the direction from which the light comes, and differences in light intensity do not lead to differentiation in motion velocity among the amoebae. Nevertheless, the whole slug orientates itself towards the light. This behaviour is mediated by a modification 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-effect’; (ii) differences in luminous intensity cause differences in NH3 concentration; (iii) NH3 alters the excitablity 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.