RESUMEN
Most bees rely on flowering plants and hence are diurnal foragers. From this ancestral state, dim-light foraging in bees requires significant adaptations to a new photic environment. We used DNA sequences to evaluate the phylogenetic history of the most diverse clade of Apoidea that is adapted to dim-light environments (Augochlorini: Megalopta, Megaloptidia and Megommation). The most speciose lineage, Megalopta, is distal to the remaining dim-light genera, and its closest diurnal relative (Xenochlora) is recovered as a lineage that has secondarily reverted to diurnal foraging. Tests for adaptive protein evolution indicate that long-wavelength opsin shows strong evidence of stabilizing selection, with no more than five codons (2%) under positive selection, depending on analytical procedure. In the branch leading to Megalopta, the amino acid of the single positively selected codon is conserved among ancestral Halictidae examined, and is homologous to codons known to influence molecular structure at the chromophore-binding pocket. Theoretically, such mutations can shift photopigment λ(max) sensitivity and enable visual transduction in alternate photic environments. Results are discussed in light of the available evidence on photopigment structure, morphological specialization and biogeographic distributions over geological time.