that do not visit flowers, we collected bees that were leaving the nest. Nests of stingless bees are defended by entrance guards19,22. Guards were identified by their typical defensive posture at the entrance and then captured. We used forceps, plastic bags, or Eppendorf tubes to capture bees, depending on the species and worker type. Other methods, such as netting of several bees at the entrance have been used in other studies41, but they do not allow for a distinction between guards and foragers.Guard and forager size measurementsBees were freeze-killed and their head width and wet weight (without pollen) measured. The head was removed from the body and laid onto a 1 mm graph paper. We photographed the heads with a Nikon D7000 digital camera with a macro lens (Nikon AF-S VR 105 mm), positioned at a standardized distance from the graph paper. Subsequently, head width was measured using ImageJ 1.46 (measurement error: 0.01 mm, N = 46 measurements). Weight was measured to the nearest 0.1 mg using a Sartorius TE64 high precision balance. In two species, wet weight was not measured because the remote sampling locations made this impossible. Additionally, workers of Frieseomelitta varia were not weighed because body parts are naturally covered in resin. Head width, but not wet weight was used to compare the size of guards and foragers because wet weight might be confounded, e.g., by foragers returning with nectar in their crops.Worker size variation for all species was measured using the coefficient of variation (CV) for head width corrected for sample size42. Worker size variation is routinely used as an overall measurement of worker polymorphism and caste diversity13,27. We calculated the CV for each colony and averaged the values to obtain the species specific CV. To estimate queen-worker dimorphism, we used published values where they existed21 and measured queen-worker dimorphism where we had access to queens (this was only possible in colonies kept in wooden hives), using the method used by ref. 21: we averaged the length from the tip of the head to the tip of the abdomen of three physogastric queens and three workers per species (1 queen and worker per colony; in S. bipunctata only two queens were available).To obtain a relative and continuous measure of worker differentiation, we expressed the size difference between guards and foragers in relation to overall worker size variation. This DI of a particular species is the ratio between the relative difference in head width between guards and foragers and the overall standard deviation of head width in a colony: HWGuardHWForagerHWStDevofcolonyHWGuard-HWForagerHWStDevofcolony. We calculated the DI for head width and head melanization (in Frieseomelitta) for each colony and averaged the values to obtain a species specific DI. Thus, a DI = 1 means that the size difference between guards and foragers corresponds to 1 standard deviation of the overall worker sample. The DI provides a straightforward way of comparing the relative degree of differentiation in different species and different morphological traits.Quantifying melanization differences in Frieseomelitta variaWe discovered that guards and foragers of three Frieseomelitta species were of different color (we also