SUMMARY Growing evidence indicates that insect ocelli are strongly adapted to meet the specific functional requirements in the environment in which that insect lives. We investigated how the ocelli of the nocturnal bee Megalopta genalis are adapted to life in the dim understory of a tropical rainforest. Using a combination of light microscopy and three-dimensional reconstruction, we found that the retinae contain bar-shaped rhabdoms loosely arranged in a radial pattern around multi-layered lenses, and that both lenses and retinae form complex non-spherical shapes reminiscent of those described in other ocelli. Intracellular electrophysiology revealed that the photoreceptors have high absolute sensitivity, but that the threshold location varied widely between 10 9 and 10 11 photons cm –2 s –1 . Higher sensitivity and greater visual reliability may be obtained at the expense of temporal resolution: the corner frequencies of dark-adapted ocellar photoreceptors were just 4–11 Hz. Spectral sensitivity profiles consistently peaked at 500 nm. Unlike the ocelli of other flying insects, we did not detect UV-sensitive visual pigments in M. genalis , which may be attributable to a scarcity of UV photons under the rainforest canopy at night. In contrast to earlier predictions based on anatomy, the photoreceptors are not sensitive to the e-vector of polarised light. Megalopta genalis ocellar photoreceptors possess a number of unusual properties, including inherently high response variability and the ability to produce spike-like potentials. These properties bear similarities to photoreceptors in the compound eye of the cockroach, and we suggest that the two insects share physiological characteristics optimised for vision in dim light.