Three main benefits are thought to underlie communal roosting in birds: a r
eduction in thermoregulation demands, a decrease in predation risk, and an
increase in foraging efficiency. I investigated interspecific variation in
communal roosting tendencies across categories of several ecological factor
s to examine the relevance of each functional hypothesis in the evolutionar
y transition to communal roosting and the secondary reversal to solitary ro
osting habits. The study phylogenetic tree included 30 families and 437 spe
cies. Evolutionary transitions to communal roosting occurred more often on
branches with flocking species and with larger species but were not associa
ted with diet, territoriality, geographical area, or time of day. The assoc
iation with flocking activities suggests that increased foraging efficiency
, a factor thought to operate through the formation of flocks, may have bee
n a key factor in the origin of avian communal roosting. However, several t
ransitions to communal roosting occurred on branches with nonflocking speci
es, indicating that foraging efficiency may not be the only factor involved
in the evolution of communal roosting. Secondary losses of communal roosti
ng habits occurred on several branches, with a concomitant loss of flocking
behavior and a tendency to exhibit territorial behavior and nocturnal fora
ging. Secondary losses suggest that communal roosting is costly to perform
and maintain and may be lost when an asocial selection regime operates. The
large number of exceptions to the above patterns may force a reevaluation
of current functional hypotheses about communal roosting in birds.