Whether prey species avoid predators and predator species track prey is a poorly understood aspect of predator-prey interactions, given measuring prey tracking by predators and predator avoidance by prey is challenging. A common approach to study these interactions among mammals in field situations is to monitor the spatial proximity of animals at fixed times, using GPS tags fitted to individuals. However, this method is invasive and only allows tracking of a subset of individuals. Here, we use an alternative, noninvasive camera-trapping approach to monitor temporal proximity of predator and prey animals. We deployed camera traps at fixed locations on Barro Colorado Island, Panama, where the ocelot (Leopardus pardalis) is the principal mammalian predator, and tested two hypotheses: (1) prey animals avoid ocelots; and (2) ocelots track prey. We quantified temporal proximity of predators and prey by fitting parametric survival models to the time intervals between subsequent prey and predator captures by camera traps, and then compared the observed intervals to random permutations that retained the spatiotemporal distribution of animal activity. We found that time until a prey animal appeared at a location was significantly longer than expected by chance if an ocelot had passed, and that the time until an ocelot appeared at a location was significantly shorter than expected by chance after prey passage. These findings are indirect evidence for both predator avoidance and prey tracking in this system. Our results show that predator avoidance and prey tracking influence predator and prey distribution over time in a field setting. Moreover, this study demonstrates that camera trapping is a viable and noninvasive alternative to GPS tracking for studying certain predator-prey interactions.