The breathing behavior of the jeju fish Hoplerythrinus unitaeniatus has been the focus of several studies in recent decades. Few of these studies, however, have described how the fish's air breathing functions in natural environments. We examined changes in the behavior of H. unitaeniatus during daily variations in the dissolved-oxygen (DO) content of the water in Amazonian streams. We recorded the mean time intervals between instances when the fish breached the water surface to take in atmospheric air and the variation in the DO concentrations. We also observed the number of individual fish that breached the surface together as well as their territory-forming behavior. We recorded the individual and collective anti-predator strategies in the presence of a potential predator, experimentally testing the capacity of H. unitaeniatus to recognize the shape of a predator. The results indicated that as the DO concentration decreased, the individuals of H. unitaeniatus tended to breach the water surface at shorter time intervals, which increased their exposure to predators. To minimize the risks from this longer exposure time, the species tends to adopt anti-predator strategies individually or as a group. In well-lit locations, the fish recognized the predator's silhouette, left their territory and took a longer time to return. We provide an original contribution to the understanding of the anti-predatory tactics of the species by describing the behavior of group formation and territory definition as a tool to maximize efficiency in the defense against predators, a behavior that until now was an unknown strategy for this species.Abstract in Portuguese is available in the online version of this article.