This study uses the enteric bacterium Escherichia coli as an experimental system to examine evolutionary responses of bacteria to an environmental acidic-alkaline range between pH 5.3 and 7.8 (15-5000 nM [H(+)]). Our goal was both to test general hypotheses about adaptation to abiotic variables and to provide insights into how coliform organisms might respond to changing conditions inside and outside of hosts. Six replicate lines of E. coli evolved for 2000 generations at one of four different constant pH conditions: pH 5.3, 6.3, 7.0, or 7.8. Direct adaptation to the evolutionary environment, as well as correlated changes in other environments, was measured as a change in fitness relative to the ancestor in direct competition experiments. The pH 5.3 group had the highest fitness gains, with a highly significant increase of 20%. The pH 7.8 group had far less significant gains and much higher variance among its lines. Analysis of individual lines within these two groups revealed complex patterns of adaptation: all of the pH 5.3 lines exhibited trade-offs (reduced fitness in another environment), but only 33% of the pH 7.8 lines showed such trade-offs and one of the pH 7.8 lines demonstrated exaptation by improving fitness in the pH 5.3 environment. Although there was also prevalent exaptation in other groups to the acidic environment, there were no such cases of exaptation to alkalinity. Comparison across the entire experimental pH range revealed that the most acidic lines, the pH 5.3 group, were all specialists, in contrast to the pH 6.3 lines, which were almost all generalists. That is, although none of the pH 5.3 lines showed any correlated fitness gains, all of the pH 6.3 lines did.