The pied kingfisher has two types of helpers at the nest: primary ones, helping their own parents, and secondary ones, helping birds other than parents. Primary helpers are always accepted by breeding pairs, secondary helpers only in poor environmental conditions where the time and energy budget of parents is not sufficient for rearing the offspring alone. Under these conditions, helpers increase the breeding success of pairs (Tables 2 and 3) by providing additional food for the young (Table 4). Thus the flexible helper structure can be seen as an ecological adaptation. It is argued that-originating from a skewed sex ratio and breeding in colonies-this adaptation evolved through the combined effects of individual and kin selection.