The spatial structure of ecological communities, including that of bacteria, is often influenced by species sorting by contemporary environmental conditions. Moreover, historical processes, i.e., ecological and evolutionary events that have occurred at some point in the past, such as dispersal limitation, drift, priority effects, or selection by past environmental conditions, can be important, but are generally investigated much less. Here, we conducted a field study using 16 rock pools, where we specifically compared the importance of past vs. contemporary environmental conditions for bacterial community structure by correlating present differences in bacterial community composition among pools to environmental conditions measured on the same day, as well as to those measured 2, 4, 6, and 8 d earlier. The results prove that selection by past environmental conditions exists, since we were able to show that bacterial communities are, to a greater extent, an imprint of past compared to contemporary environmental conditions. We suggest that this is the result of a combination of different mechanisms, including priority effects that cause rapid adaptation to new environmental conditions of taxa that have been initially selected by past environmental conditions, and slower rates of turnover in community composition compared to environmental conditions.