Although interactions between species are often assumed to be fixed, theory and empirical evidence suggest that they may be quite variable, changing in the presence of other species or environmental conditions. The interaction between ants and nesting birds exhibits such variability, ants sometimes being predators of bird nests and other times protectors of them. Hypothesizing that predation risk might be a critical factor in altering the interaction of ants with birds, I investigated the interaction of wood ants Formica aquilonia with nesting birds under different levels of predation risk. In a controlled field experiment, I allowed tits (Parus major, P. caeruleus, P. ater) and pied flycatchers (Ficedula hypoleuca) to select nest boxes in trees with ants (ant trees) or trees without ants. I found that birds usually nested in trees without ants, apparently to avoid the danger of injury from encounters with ants. Nesting in ant trees occurred mainly in the habitat where risk of predation was highest (along the forest edge), and with the bird taxa that lost nests most frequently in trees without ants (tits). Tits nesting on the forest edge achieved significantly greater nesting success, and fledged significantly more young, in ant trees compared with trees without ants. As the season progressed, ant traffic increased in trees without nesting birds, but decreased in trees with nesting birds, indicating that the outcome of interference competition between ants and nesting birds was reversed under increased predation risk. These results support the idea that predation risk can shift species interactions from predominately competitive processes to predominately facilitative processes.