The cells comprising the frontal eye of a 12.5 day amphioxus larva are described based on 3D reconstructions from serial electron micrographs, along with the fibre tracts and more caudal groupings of cells in the nerve cord to which the frontal eye appears to be linked. The frontal eye consists of a pigment cup, two transverse rows of receptor cells, and clusters of neurons whose close association with the medial receptor cells suggests they may function as an integral part of the eye complex. Neurites from both the receptor cells and neurons supply the ventrolateral nerve tracts, which consist mainly of axons arising from sensory cells located at the rostral tip of the larva. A core group of 3-4 rostral fibres on each side innervate two ventral giant cells located just behind the cerebral vesicle in the primary motor centre (PMC). The circuitry suggests these cells may be responsible for triggering the larval startle response. The ventrolateral tracts also include two types of axial dendrite-like fibres: (i) a single unpaired fibre, a forward continuation of the principal dendrite of the left giant cell, which is the main target for synapses from neurons in the frontal eye; and (ii) sets of paired fibres from cells in the tectum, a dorsal cortex-like structure located at the back of the cerebral vesicle through which the dorsal sensory nerves pass in transit to the PMC. Recent behavioural studies show that larvae feed in a hovering posture that maximally shades the frontal eye. They also orient to light in this position. The shape and orientation of the frontal eye suggests it could be responsible for this response. The existence of separate pathways from lateral and medial receptor cells, both directly and indirectly to the PMC, suggests the frontal eye may also be involved in modulating locomotory behaviour during hovering. The visual `system' described here for amphioxus larvae is more like that of vertebrates than has previously been recognized. Specifically: (i) the medial nerve cells of the frontal eye appear to form local circuits with relay and integrative functions similar to those of the retina, involving cell types that resemble specific retinal interneurons; and (ii) output is directed to a region at the back of the posterior c.v. that resembles the vertebrate midbrain, and which may be its homologue. This region has a dorsal tectum and, like the midbrain, includes the anterior part of a ventral zone of motoneurons and reticulospinal interneurons. The morphological evidence supports the idea that the `brain' of amphioxus is sufficiently like that of vertebrates to provide important clues concerning the basic organization and subdivision of the vertebrate brain.